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++)); }
public static DoWhileLoopNode DoWhile(AstNode test, AstNode body) { if (body != null) { body.SortChildren(); } return(new DoWhileLoopNode(test, body, _nodeIndex++)); }
public static ForeachLoopNode Foreach(AstNode variableDefinition, AstNode sourceExpression, AstNode body) { if (body != null) { body.SortChildren(); } return(new ForeachLoopNode(variableDefinition, sourceExpression, body, _nodeIndex++)); }
public static LoopNode Loop(AstNode body) { if (body != null) { body.SortChildren(); } var loopNode = new LoopNode("LOOP", body, _nodeIndex++); loopNode.SortChildren(); return(loopNode); }