// for visitenter, visitexit, visitexecute // require 1 to a maximum of 2 children for them to be called as user would expect. public override void Accept(IParseTreeVisitor visitor) { visitor.VisitEnter(this); int i = 0; foreach (AExpression expression in Children) { if (i++ != 0) { visitor.VisitExecute(this); } expression.Accept(visitor); } visitor.VisitLeave(this); }
public override void Accept(IParseTreeVisitor visitor) { visitor.Visit(this); }
public abstract void Accept(IParseTreeVisitor visitor);