public ASTFor(ASTDeclarationLocal init, ASTExpression conditional, ASTExpression loop, ASTStatement body) { InitialExpr = init; Conditional = conditional; LoopExpr = loop; Body = body.WrapInBlock(); }
public ASTForIn(ASTIdentifier variable, ASTExpression lower, ASTExpression upper, ASTStatement body) { TempVariable = variable; Lower = lower; Upper = upper; Body = body.WrapInBlock(); }
public ASTDeclarationLocal(LexLocation location, ASTType type, String id, ASTExpression value) { HasValue = true; Type = type; ID = id; Location = location; InitialValue = value; }
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 ASTBinary(ASTExpression left, ASTExpression right) { Left = left; Right = right; }
public ASTExponent(ASTExpression left, ASTExpression right) : base(left, right) { }
public ASTDereferenceArray(ASTExpression array, ASTExpression index) { Array = array; Index = index; }
public ASTEqual(ASTExpression left, ASTExpression right) : base(left, right) { }
public ASTAnd(ASTExpression exp1, ASTExpression exp2) : base(exp1, exp2) { }
public ASTDereferenceField(ASTExpression obj, String field) { Object = obj; Field = field; }
public ASTConcatenate(ASTExpression left, ASTExpression right) : base(left, right) { }
public ASTWhile(ASTExpression condition, ASTStatement body) { Condition = condition; Body = body.WrapInBlock(); }
public ASTMultiply(ASTExpression left, ASTExpression right) : base(left, right) { }
public ASTAdd(ASTExpression left, ASTExpression right) : base(left, right) { }
public ASTDivide(ASTExpression left, ASTExpression right) : base(left, right) { }
public ASTIncrement(ASTExpression inc) { Expression = inc; }
public ASTInstantiateArray(ASTType type, ASTExpression low, ASTExpression up) { Type = type; Lower = low; Upper = up; }
public ASTDecrement(ASTExpression dec) { Expression = dec; }
public ASTAssign(ASTLValue lval, ASTExpression exp) { LValue = lval; Expr = exp; }
public ASTIfThenElse(ASTExpression condition, ASTStatement then, ASTStatement elseStatement) : base(condition, then) { Else = elseStatement.WrapInBlock(); Else.IsBranch = true; }
public ASTStatementExpr(ASTExpression exp) { Expression = exp; }
public ASTReturn(ASTExpression retVal) { ReturnValue = retVal; }
public ASTGreater(ASTExpression left, ASTExpression right) : base(left, right) { }
public ASTSmaller(ASTExpression left, ASTExpression right) : base(left, right) { }
public ASTExpressionList(ASTExpression exp, ASTExpressionList tail) { Expr = exp; Tail = tail; Length = Tail.Length + 1; }
public ASTNot(ASTExpression not) { Expression = not; }
public ASTModulo(ASTExpression left, ASTExpression right) : base(left, right) { }
public ASTInvoke(ASTExpression obj, String method, ASTExpressionList actuals) { Object = obj; Method = method; Actuals = actuals; }
public ASTNegative(ASTExpression exp) { Expression = exp; }
public ASTSubtract(ASTExpression left, ASTExpression right) : base(left, right) { }