use of sugarVisitors.ToAst in project L42 by ElvisResearchGroup.
the class Parser method parse.
public static synchronized Expression parse(String fileName, String s) {
String old = Parser.fileName;
Parser.fileName = fileName;
try {
checkForTab(s);
checkForBalancedParenthesis(s);
s = replaceORoundWithTab(s);
NudeEContext ctxResult = parseCtx(s);
Expression result = ctxResult.accept(new ToAst());
return result;
} finally {
Parser.fileName = old;
}
}
Aggregations