/** Boucle while, while ( Exp !=0) { Exp }. */ public class ExpWhile extends Exp{ public Exp e1, e2; public ExpWhile(Exp e1, Exp e2) { super(e1, e2); this.e1 = e1; this.e2 = e2; } public Integer eval(){ Integer res = -1; while (e1.eval() != 0) res = e2.eval(); return res; } public void accept(AstVisitor v) { v.visit(this); } }