comparison src/luan/interp/WhileStmt.java @ 49:8ede219cd111

add WebShell git-svn-id: https://luan-java.googlecode.com/svn/trunk@50 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Fri, 28 Dec 2012 19:35:04 +0000
parents 64ecb7a3aad7
children c9100f29fae0
comparison
equal deleted inserted replaced
48:64ecb7a3aad7 49:8ede219cd111
11 WhileStmt(Expr cnd,Stmt doStmt) { 11 WhileStmt(Expr cnd,Stmt doStmt) {
12 this.cnd = cnd; 12 this.cnd = cnd;
13 this.doStmt = doStmt; 13 this.doStmt = doStmt;
14 } 14 }
15 15
16 @Override public void eval(LuanStateImpl lua) throws LuanException { 16 @Override public void eval(LuanStateImpl luan) throws LuanException {
17 try { 17 try {
18 while( Luan.toBoolean( cnd.eval(lua) ) ) { 18 while( Luan.toBoolean( cnd.eval(luan) ) ) {
19 doStmt.eval(lua); 19 doStmt.eval(luan);
20 } 20 }
21 } catch(BreakException e) {} 21 } catch(BreakException e) {}
22 } 22 }
23 } 23 }