예제 #1
0
        public virtual T VisitChildren(ASTVisitableElement node)
        {
            ASTVisitableElement oldParent = currentParent;

            currentParent = node;
            T result = default(T);

            foreach (ASTVisitableElement child in node.GetChildren())
            {
                result = AggregateResult(result, child.Accept(visitor: this));
            }
            currentParent = oldParent;
            return(result);
        }
예제 #2
0
 public virtual T Visit(ASTVisitableElement node)
 {
     return(node.Accept(visitor: this));
 }