Exemple #1
0
 public While(Expr cond, Stmt body)
 {
     this.cond = cond;
     this.body = body;
 }
Exemple #2
0
 public Do(Stmt body, Expr cond)
 {
     this.body = body;
     this.cond = cond;
 }
Exemple #3
0
 public object Execute(Stmt stmt)
 {
     return(stmt.Accept(this));
 }
Exemple #4
0
 public If(Expr cond, Stmt thenBranch, Stmt elseBranch)
 {
     this.cond       = cond;
     this.thenBranch = thenBranch;
     this.elseBranch = elseBranch;
 }
Exemple #5
0
 public object Resolve(Stmt stmt)
 {
     return(stmt.Accept(this));
 }