/// <summary> /// Perform Tree to Code generation /// </summary> protected virtual void TreeToCode() { if (RootNode != null) { RootNode.Accept(this); } }
public object Run(string script, TSQLEngine engine, CancellationToken cancellationToken) { try { this.lexer = new Lexer(script, true); this.parser = new Parser.Parser(lexer); this.queryTree = parser.ComposeAll(); var prepareQuery = new PrepareQueryVisitor(engine, cancellationToken); this.prepareQueryTraverser = new PrepareQueryTraverseVisitor(prepareQuery, cancellationToken); queryTree.Accept(prepareQueryTraverser); queryTree = prepareQuery.Root; this.requestData = new RequestDataVisitor(engine, cancellationToken); this.requestDataTraverser = new RequestDataTraverseVisitor(requestData, cancellationToken); queryTree.Accept(requestDataTraverser); queryTree = requestData.Root; this.runQuery = new RunQueryVisitor(engine, cancellationToken); this.csharpRewriteTraverser = new RunQueryTraverseVisitor(runQuery, cancellationToken); queryTree.Accept(csharpRewriteTraverser); return(runQuery.Result); } catch (AggregateException ex) { throw ex.InnerException; } }
public void Visit(RootNode node) { node.Expression.Accept(this); node.Accept(_visitor); }
public void Resolve(RootNode root) { root.Accept(this); }
public bool Accept(Func <ElementNode, object, bool> visitor, object param) { return(RootNode.Accept(visitor, param)); }
public bool Accept(IHtmlTreeVisitor visitor, object param) { return(RootNode.Accept(visitor, param)); }