use of org.strategoxt.lang.Context in project spoofax by metaborg.
the class StrategoCommon method prettyPrint.
@Override
public IStrategoString prettyPrint(IStrategoTerm term) {
final Context context = strategoRuntimeService.genericRuntime().getCompiledContext();
final ITermFactory termFactory = termFactoryService.getGeneric();
org.strategoxt.stratego_aterm.Main.init(context);
term = aterm_escape_strings_0_0.instance.invoke(context, term);
term = pp_aterm_box_0_0.instance.invoke(context, term);
term = box2text_string_0_1.instance.invoke(context, term, termFactory.makeInt(120));
return (IStrategoString) term;
}
Aggregations