public IfNode Walk()
        {
            var ifNode = new IfNode
                             {
                                 Condition = new TranslationTranslator(node.GetChild(0)).Walk(),
                                 TrueBranch = new StatementTranslator(node.GetChild(1)).Walk()
                             };

            if (node.ChildCount > 2)
            {
                ifNode.FalseBranch = new StatementTranslator(node.GetChild(2)).Walk();
            }

            return ifNode;
        }
Beispiel #2
0
 public IfCompiler(IfNode node)
 {
     this.node = node;
 }