public static LoopStmt MakeWhile(Expr cond, BlockStmt body) { return(new LoopStmt() { Type = LoopType.WHILE, Cond = cond, Body = body }); }
public static IfStmt MakeIf(Expr cond, BlockStmt then, Stmt otherwise) { return(new IfStmt() { Cond = cond, Then = then, Otherwise = otherwise }); }
public static LoopStmt MakeFor(Stmt init, Expr cond, Expr step, BlockStmt body) { return(new LoopStmt() { Type = LoopType.FOR, Init = init, Cond = cond, Step = step, Body = body }); }