public PftConditionalStatement
 (
     PftParser.ConditionalStatementContext context
 )
 {
     Condition = PftDispatcher.DispatchCondition(context.condition());
     foreach (PftParser.CompositeElementContext element
              in context.thenBranch.compositeElement())
     {
         ThenBranch.Add((PftCompositeElement)PftDispatcher.DispatchFormat(element));
     }
     foreach (PftParser.CompositeElementContext element
              in context.elseBranch.compositeElement())
     {
         ElseBranch.Add((PftCompositeElement)PftDispatcher.DispatchFormat(element));
     }
 }
示例#2
0
 public void DiscoverChildren
 (
     ParserRuleContext context
 )
 {
     foreach (IParseTree node in context.children)
     {
         ParserRuleContext ctx = node as ParserRuleContext;
         if (ctx != null)
         {
             PftAst child = PftDispatcher.DispatchFormat(ctx);
             if (!ReferenceEquals(child, null))
             {
                 Children.Add(child);
             }
         }
     }
 }