public Expression Parse(Type rootType, String source) { if (__parser == null) { var grammar = new ODataFilterGrammar(); __parser = new Parser(grammar); } var parseTree = __parser.Parse(source); if (parseTree == null || parseTree.Root == null) { throw new Exception("Unable to parse: " + source); } var expr = ParseTreeVisitor.Parse(rootType, parseTree.Root); return expr; }
public Expression Parse(Type rootType, String source) { if (__parser == null) { var grammar = new ODataFilterGrammar(); __parser = new Parser(grammar); } var parseTree = __parser.Parse(source); if (parseTree == null || parseTree.Root == null) { throw new Exception("Unable to parse: " + source); } var expr = ParseTreeVisitor.Parse(rootType, parseTree.Root); return(expr); }
public ExpressionTreeBuilder() { var grammer = new ODataFilterGrammar(); _parser = new Parser(grammer); }