public static void Visit(this Node node, IParseTreeVisitor visitor) { int i = 0; switch (node.Name) { case "sequence": visitor.VisitSequence(node); if (node[i].Name == "var_def") { visitor.VisitSequence(node); ++i; } for (int max = node.Count; i < max; ++i) node[i].Visit(visitor); break; case "var_def": visitor.VisitVariableDefinition(node); break; } }
public virtual void AcceptVisitor(IParseTreeVisitor visitor) { //No default implementation }
public override void AcceptVisitor(IParseTreeVisitor visitor) { visitor.Visit(this); }
public override T Accept <T>(IParseTreeVisitor <T> visitor) { return(visitor.VisitErrorNode(this)); }
public static IEnumerable <T> Visit <T>(this IEnumerable <ParserRuleContext> context, IParseTreeVisitor <T> visitor) { return(context.Select(visitor.Visit)); }
public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) { ITmtVisitor<TResult> typedVisitor = visitor as ITmtVisitor<TResult>; if (typedVisitor != null) return typedVisitor.VisitSubject(this); else return visitor.VisitChildren(this); }
public virtual T Accept <T>(IParseTreeVisitor <T> visitor) { return(visitor.VisitChildren(this)); }
public virtual T Accept <T>(IParseTreeVisitor <T> visitor) { return(visitor.VisitTerminal(this)); }
public void AcceptParseTreeVisitor(IParseTreeVisitor visitor) { visitor.VisitTypeSpecifier(this); }
public void AcceptParseTreeVisitor(IParseTreeVisitor visitor) { visitor.VisitIdentifier(this); }
public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) { IcoolgrammarVisitor<TResult> typedVisitor = visitor as IcoolgrammarVisitor<TResult>; if (typedVisitor != null) return typedVisitor.VisitExpr_list(this); else return visitor.VisitChildren(this); }
public void AcceptParseTreeVisitor(IParseTreeVisitor visitor) { visitor.VisitStructFunctionAssociation(this); }
public void AcceptParseTreeVisitor(IParseTreeVisitor visitor) { visitor.VisitFunctionCall(this); }
public ParseTreeVisitorExtension(IParseTreeVisitor visitor) { _visitor = visitor; }