예제 #1
0
 public static ForLoopNode For(AstNode initiator, AstNode test, AstNode incrementor, AstNode body)
 {
     if (body != null)
     {
         body.SortChildren();
     }
     return(new ForLoopNode(initiator, test, incrementor, body, _nodeIndex++));
 }
예제 #2
0
 public static DoWhileLoopNode DoWhile(AstNode test, AstNode body)
 {
     if (body != null)
     {
         body.SortChildren();
     }
     return(new DoWhileLoopNode(test, body, _nodeIndex++));
 }
예제 #3
0
 public static ForeachLoopNode Foreach(AstNode variableDefinition, AstNode sourceExpression, AstNode body)
 {
     if (body != null)
     {
         body.SortChildren();
     }
     return(new ForeachLoopNode(variableDefinition, sourceExpression, body, _nodeIndex++));
 }
예제 #4
0
        public static LoopNode Loop(AstNode body)
        {
            if (body != null)
            {
                body.SortChildren();
            }
            var loopNode = new LoopNode("LOOP", body, _nodeIndex++);

            loopNode.SortChildren();
            return(loopNode);
        }