Exemplo n.º 1
0
        internal override AstVisitAction InternalVisit(AstVisitor visitor)
        {
            AstVisitAction action = visitor.VisitErrorStatement(this);

            if (action == AstVisitAction.SkipChildren)
            {
                return(AstVisitAction.Continue);
            }
            if ((action == AstVisitAction.Continue) && (this.NestedAst != null))
            {
                foreach (Ast ast in this.NestedAst)
                {
                    action = ast.InternalVisit(visitor);
                    if (action != AstVisitAction.Continue)
                    {
                        break;
                    }
                }
            }
            if ((action == AstVisitAction.Continue) && (this.Flags != null))
            {
                foreach (Tuple <Token, Ast> tuple in this.Flags.Values)
                {
                    if (tuple.Item2 != null)
                    {
                        action = tuple.Item2.InternalVisit(visitor);
                        if (action != AstVisitAction.Continue)
                        {
                            break;
                        }
                    }
                }
            }
            if ((action == AstVisitAction.Continue) && (this.Conditions != null))
            {
                foreach (Ast ast2 in this.Conditions)
                {
                    action = ast2.InternalVisit(visitor);
                    if (action != AstVisitAction.Continue)
                    {
                        break;
                    }
                }
            }
            if ((action == AstVisitAction.Continue) && (this.Bodies != null))
            {
                foreach (Ast ast3 in this.Bodies)
                {
                    action = ast3.InternalVisit(visitor);
                    if (action != AstVisitAction.Continue)
                    {
                        return(action);
                    }
                }
            }
            return(action);
        }
Exemplo n.º 2
0
 internal override AstVisitAction InternalVisit(AstVisitor visitor)
 {
     AstVisitAction action = visitor.VisitErrorStatement(this);
     if (action == AstVisitAction.SkipChildren)
     {
         return AstVisitAction.Continue;
     }
     if ((action == AstVisitAction.Continue) && (this.NestedAst != null))
     {
         foreach (Ast ast in this.NestedAst)
         {
             action = ast.InternalVisit(visitor);
             if (action != AstVisitAction.Continue)
             {
                 break;
             }
         }
     }
     if ((action == AstVisitAction.Continue) && (this.Flags != null))
     {
         foreach (Tuple<Token, Ast> tuple in this.Flags.Values)
         {
             if (tuple.Item2 != null)
             {
                 action = tuple.Item2.InternalVisit(visitor);
                 if (action != AstVisitAction.Continue)
                 {
                     break;
                 }
             }
         }
     }
     if ((action == AstVisitAction.Continue) && (this.Conditions != null))
     {
         foreach (Ast ast2 in this.Conditions)
         {
             action = ast2.InternalVisit(visitor);
             if (action != AstVisitAction.Continue)
             {
                 break;
             }
         }
     }
     if ((action == AstVisitAction.Continue) && (this.Bodies != null))
     {
         foreach (Ast ast3 in this.Bodies)
         {
             action = ast3.InternalVisit(visitor);
             if (action != AstVisitAction.Continue)
             {
                 return action;
             }
         }
     }
     return action;
 }