public sourceElement ( ) : ES3Parser.sourceElement_return | ||
Результат | ES3Parser.sourceElement_return |
public static JsStatement ParseStatement(string source) { var lex = new ES3Lexer(new ANTLRStringStream(source.Trim())); CommonTokenStream tokens = new CommonTokenStream(lex); var parser = new ES3Parser(tokens); var r = parser.sourceElement(); var tree = new ES3Walker(new CommonTreeNodeStream(r.Tree)); return(tree.statement()); }
public static JsStatement ParseStatement(string source, bool allowCustomKeywords = false) { var lex = new ES3Lexer(new ANTLRStringStream(source.Trim())) { AllowCustomKeywords = allowCustomKeywords }; var tokens = new CommonTokenStream(lex); var parser = new ES3Parser(tokens); var r = parser.sourceElement(); var tree = new ES3Walker(new CommonTreeNodeStream(r.Tree)); return(tree.statement()); }