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