Esempio n. 1
0
 public static LoopStmt MakeWhile(Expr cond, BlockStmt body)
 {
     return(new LoopStmt()
     {
         Type = LoopType.WHILE,
         Cond = cond,
         Body = body
     });
 }
Esempio n. 2
0
 public static IfStmt MakeIf(Expr cond, BlockStmt then, Stmt otherwise)
 {
     return(new IfStmt()
     {
         Cond = cond,
         Then = then,
         Otherwise = otherwise
     });
 }
Esempio n. 3
0
 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
     });
 }