Mercurial Hosting > luan
comparison core/src/luan/impl/ForStmt.java @ 647:8e8c30b72e9b
move methods from LuanState to Luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Mar 2016 20:39:14 -0600 |
parents | 859c0dedc8b6 |
children |
comparison
equal
deleted
inserted
replaced
646:cdc70de628b5 | 647:8e8c30b72e9b |
---|---|
19 } | 19 } |
20 | 20 |
21 @Override public void eval(LuanStateImpl luan) throws LuanException { | 21 @Override public void eval(LuanStateImpl luan) throws LuanException { |
22 Object fnObj = iterExpr.eval(luan); | 22 Object fnObj = iterExpr.eval(luan); |
23 try { | 23 try { |
24 LuanFunction iter = luan.checkFunction(fnObj); | 24 LuanFunction iter = Luan.checkFunction(fnObj); |
25 while(true) { | 25 while(true) { |
26 Object vals = iter.call(luan); | 26 Object vals = iter.call(luan); |
27 if( vals==null ) | 27 if( vals==null ) |
28 break; | 28 break; |
29 if( vals instanceof Object[] ) { | 29 if( vals instanceof Object[] ) { |