예제 #1
0
 public ForStatement(ExpressionStatement initStatement, Expression continueExpr, Expression nextExpr, Statement body, Block parent, Location startLoc, Location endLoc)
 {
     InitBlock = new Block(parent, startLoc)
     {
         EndLocation = endLoc
     };
     InitBlock.Statements.Add(initStatement);
     ContinueExpression = continueExpr;
     NextExpression     = nextExpr;
     LoopBody           = body;
     if (LoopBody is Block)
     {
         ((Block)LoopBody).Parent = InitBlock;
     }
 }
예제 #2
0
 public ForStatement(Block decls, Expression continueExpr, Expression nextExpr, Statement body)
 {
     InitBlock          = decls;
     ContinueExpression = continueExpr;
     NextExpression     = nextExpr;
     LoopBody           = body;
 }