public ASTForIn(ASTIdentifier variable, ASTExpression lower, ASTExpression upper, ASTStatement body) { TempVariable = variable; Lower = lower; Upper = upper; Body = body.WrapInBlock(); }
public ASTFor(ASTDeclarationLocal init, ASTExpression conditional, ASTExpression loop, ASTStatement body) { InitialExpr = init; Conditional = conditional; LoopExpr = loop; Body = body.WrapInBlock(); }
public ASTIfThen(ASTExpression condition, ASTStatement then) { Condition = condition; //I think it's most appropriate to record the presence of the implied block around 1 line statements here, rather than in the grammar. Then = then.WrapInBlock(); Then.IsBranch = true; }
public ASTWhile(ASTExpression condition, ASTStatement body) { Condition = condition; Body = body.WrapInBlock(); }
public ASTIfThenElse(ASTExpression condition, ASTStatement then, ASTStatement elseStatement) : base(condition, then) { Else = elseStatement.WrapInBlock(); Else.IsBranch = true; }
public virtual void VisitBlock(ASTBlock n) { }