Example #1
0
 public ASTForIn(ASTIdentifier variable, ASTExpression lower, ASTExpression upper, ASTStatement body)
 {
     TempVariable = variable;
     Lower        = lower;
     Upper        = upper;
     Body         = body.WrapInBlock();
 }
Example #2
0
 public ASTFor(ASTDeclarationLocal init, ASTExpression conditional, ASTExpression loop, ASTStatement body)
 {
     InitialExpr = init;
     Conditional = conditional;
     LoopExpr    = loop;
     Body        = body.WrapInBlock();
 }
Example #3
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;
        }
Example #4
0
 public ASTWhile(ASTExpression condition, ASTStatement body)
 {
     Condition = condition;
     Body      = body.WrapInBlock();
 }
Example #5
0
 public ASTIfThenElse(ASTExpression condition, ASTStatement then, ASTStatement elseStatement)
     : base(condition, then)
 {
     Else          = elseStatement.WrapInBlock();
     Else.IsBranch = true;
 }
Example #6
0
 public virtual void VisitBlock(ASTBlock n)
 {
 }