예제 #1
0
 public static LoopStmt MakeWhile(Expr cond, BlockStmt body)
 {
     return(new LoopStmt()
     {
         Type = LoopType.WHILE,
         Cond = cond,
         Body = body
     });
 }
예제 #2
0
파일: IfStmt.cs 프로젝트: XiPotatonium/XiVM
 public static IfStmt MakeIf(Expr cond, BlockStmt then, Stmt otherwise)
 {
     return(new IfStmt()
     {
         Cond = cond,
         Then = then,
         Otherwise = otherwise
     });
 }
예제 #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
     });
 }