コード例 #1
0
 public override void Init(ParsingContext context, ParseTreeNode treeNode)
 {
     base.Init(context, treeNode);
     Condition = AddChild("Condition", treeNode.ChildNodes[0]) as ExpressionAstNode;
     IfTrueStatments = AddChild("IfTrueStatments", treeNode.ChildNodes[1]) as StatementListNode;
     if (treeNode.ChildNodes.Count > 2)
         IfFalseStatements = AddChild("IfFalseStatements", treeNode.ChildNodes[2]) as StatementListNode;
 }
コード例 #2
0
        public override void Init(Irony.Parsing.ParsingContext context, Irony.Parsing.ParseTreeNode treeNode)
        {
            base.Init(context, treeNode);
            Iterator = (VariableAstNode)AddChild("iterator", treeNode.ChildNodes[0]);

            Set = (CollectionAstNode)AddChild("set", treeNode.ChildNodes[1]);
            StatementList = (StatementListNode)AddChild("statementList", treeNode.ChildNodes[2]);
        }