Example #1
0
        // 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);
        }
Example #2
0
 public override void Accept(IParseTreeVisitor visitor)
 {
     visitor.Visit(this);
 }
Example #3
0
 public abstract void Accept(IParseTreeVisitor visitor);