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