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)); } }
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); } } } }