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; } }
public ForStatement(Block decls, Expression continueExpr, Expression nextExpr, Statement body) { InitBlock = decls; ContinueExpression = continueExpr; NextExpression = nextExpr; LoopBody = body; }