use of org.metaborg.spoofax.meta.core.pluto.stamp.Sdf2RtgStamper in project spoofax by metaborg.
the class Sdf2Rtg method build.
@Override
public OutputPersisted<File> build(Input input) throws IOException {
requireBuild(input.origin);
if (SpoofaxContext.BETTER_STAMPERS) {
require(input.inputFile, new Sdf2RtgStamper(input.context));
} else {
require(input.inputFile);
}
// @formatter:off
final Arguments arguments = new Arguments().addFile("-i", input.inputFile).add("-m", input.module).addFile("-o", input.outputFile).add("--ignore-missing-cons");
final ExecutionResult result = new StrategoExecutor().withToolsContext().withStrategy(main_sdf2rtg_0_0.instance).withTracker(newResourceTracker(Pattern.quote("Invoking native tool") + ".*")).withName("sdf2rtg").executeCLI(arguments);
// @formatter:on
provide(input.outputFile);
setState(State.finished(result.success));
return OutputPersisted.of(input.outputFile);
}
Aggregations