コード例 #1
0
ファイル: stmt.cs プロジェクト: playdeezgames/Toy
 public While(Expr cond, Stmt body)
 {
     this.cond = cond;
     this.body = body;
 }
コード例 #2
0
ファイル: stmt.cs プロジェクト: playdeezgames/Toy
 public Do(Stmt body, Expr cond)
 {
     this.body = body;
     this.cond = cond;
 }
コード例 #3
0
ファイル: interpreter.cs プロジェクト: playdeezgames/Toy
 public object Execute(Stmt stmt)
 {
     return(stmt.Accept(this));
 }
コード例 #4
0
ファイル: stmt.cs プロジェクト: playdeezgames/Toy
 public If(Expr cond, Stmt thenBranch, Stmt elseBranch)
 {
     this.cond       = cond;
     this.thenBranch = thenBranch;
     this.elseBranch = elseBranch;
 }
コード例 #5
0
 public object Resolve(Stmt stmt)
 {
     return(stmt.Accept(this));
 }