Exemple #1
0
 public ASTFor(ASTDeclarationLocal init, ASTExpression conditional, ASTExpression loop, ASTStatement body)
 {
     InitialExpr = init;
     Conditional = conditional;
     LoopExpr    = loop;
     Body        = body.WrapInBlock();
 }
Exemple #2
0
 public ASTForIn(ASTIdentifier variable, ASTExpression lower, ASTExpression upper, ASTStatement body)
 {
     TempVariable = variable;
     Lower        = lower;
     Upper        = upper;
     Body         = body.WrapInBlock();
 }
Exemple #3
0
 public ASTDeclarationLocal(LexLocation location, ASTType type, String id, ASTExpression value)
 {
     HasValue     = true;
     Type         = type;
     ID           = id;
     Location     = location;
     InitialValue = value;
 }
Exemple #4
0
        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;
        }
Exemple #5
0
 public ASTBinary(ASTExpression left, ASTExpression right)
 {
     Left  = left;
     Right = right;
 }
Exemple #6
0
 public ASTExponent(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }
Exemple #7
0
 public ASTDereferenceArray(ASTExpression array, ASTExpression index)
 {
     Array = array;
     Index = index;
 }
Exemple #8
0
 public ASTEqual(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }
Exemple #9
0
 public ASTAnd(ASTExpression exp1, ASTExpression exp2)
     : base(exp1, exp2)
 {
 }
Exemple #10
0
 public ASTDereferenceField(ASTExpression obj, String field)
 {
     Object = obj;
     Field  = field;
 }
Exemple #11
0
 public ASTConcatenate(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }
Exemple #12
0
 public ASTWhile(ASTExpression condition, ASTStatement body)
 {
     Condition = condition;
     Body      = body.WrapInBlock();
 }
Exemple #13
0
 public ASTMultiply(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }
Exemple #14
0
 public ASTAdd(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }
Exemple #15
0
 public ASTDivide(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }
Exemple #16
0
 public ASTIncrement(ASTExpression inc)
 {
     Expression = inc;
 }
Exemple #17
0
 public ASTInstantiateArray(ASTType type, ASTExpression low, ASTExpression up)
 {
     Type  = type;
     Lower = low;
     Upper = up;
 }
Exemple #18
0
 public ASTDecrement(ASTExpression dec)
 {
     Expression = dec;
 }
Exemple #19
0
 public ASTAssign(ASTLValue lval, ASTExpression exp)
 {
     LValue = lval;
     Expr   = exp;
 }
Exemple #20
0
 public ASTIfThenElse(ASTExpression condition, ASTStatement then, ASTStatement elseStatement)
     : base(condition, then)
 {
     Else          = elseStatement.WrapInBlock();
     Else.IsBranch = true;
 }
Exemple #21
0
 public ASTStatementExpr(ASTExpression exp)
 {
     Expression = exp;
 }
Exemple #22
0
 public ASTReturn(ASTExpression retVal)
 {
     ReturnValue = retVal;
 }
Exemple #23
0
 public ASTGreater(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }
Exemple #24
0
 public ASTSmaller(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }
Exemple #25
0
 public ASTExpressionList(ASTExpression exp, ASTExpressionList tail)
 {
     Expr   = exp;
     Tail   = tail;
     Length = Tail.Length + 1;
 }
Exemple #26
0
 public ASTNot(ASTExpression not)
 {
     Expression = not;
 }
Exemple #27
0
 public ASTModulo(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }
Exemple #28
0
 public ASTInvoke(ASTExpression obj, String method, ASTExpressionList actuals)
 {
     Object  = obj;
     Method  = method;
     Actuals = actuals;
 }
Exemple #29
0
 public ASTNegative(ASTExpression exp)
 {
     Expression = exp;
 }
Exemple #30
0
 public ASTSubtract(ASTExpression left, ASTExpression right)
     : base(left, right)
 {
 }