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 ASTBlock(ASTStatement body) { Body = body; }
public ASTStatementList(ASTStatement statement, ASTStatementList tail) { IsEmpty = false; Statement = statement; Tail = tail; }
public ASTForIn(ASTIdentifier variable, ASTExpression lower, ASTExpression upper, ASTStatement body) { TempVariable = variable; Lower = lower; Upper = upper; Body = body.WrapInBlock(); }
public ASTWhile(ASTExpression condition, ASTStatement body) { Condition = condition; Body = body.WrapInBlock(); }
public ASTFor(ASTDeclarationLocal init, ASTExpression conditional, ASTExpression loop, ASTStatement body) { InitialExpr = init; Conditional = conditional; LoopExpr = loop; Body = body.WrapInBlock(); }
public ASTIfThenElse(ASTExpression condition, ASTStatement then, ASTStatement elseStatement) : base(condition, then) { Else = elseStatement.WrapInBlock(); Else.IsBranch = true; }
public virtual void VisitStatement(ASTStatement n) { }