// It does not use StatementBlock to handle else-if statements as IfStatement (i.e. IfStatement(trueBlock, IfStatement(elseIfTrue, finalElseBlock)) etc.) public static Statement IfThenElse(Expression cond, Statement trueBlock, Statement falseBlock) { return new IfStatement (cond, trueBlock, falseBlock); }
public IfStatement(Expression cond, Statement trueBlock, Statement falseBlock) { Condition = cond; TrueBlock = trueBlock; FalseBlock = falseBlock; }
public static Statement For(List<Statement> init, Expression cond, Statement cont, StatementBlock body) { return new ForStatement (init, cond, cont, body); }
public ForStatement(List<Statement> init, Expression cond, Statement cont, StatementBlock body) { Initializers = init; Condition = cond; Continuer = cont; Body = body; }