Mercurial Hosting > luan
comparison src/luan/LuanState.java @ 157:1de3e4a6e82d
remove LuanJavaFunction.RTN_NUMBER_ARRAY;
add request.java and response.java;
convert java Object[] members to List;
let LuanState.eval() take env;
improve web_run.luan;
rename LuanParser.JspExpressions to TemplateExpressions and add TemplateStmt;
git-svn-id: https://luan-java.googlecode.com/svn/trunk@158 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 18 Jun 2014 21:07:11 +0000 |
parents | f35c50027985 |
children | d310ebf4d6e7 |
comparison
equal
deleted
inserted
replaced
156:925ba2d59b9d | 157:1de3e4a6e82d |
---|---|
149 throw new RuntimeException(e); | 149 throw new RuntimeException(e); |
150 } | 150 } |
151 } | 151 } |
152 | 152 |
153 public final Object eval(String cmd) { | 153 public final Object eval(String cmd) { |
154 return eval(cmd,new LuanTable()); | |
155 } | |
156 | |
157 public final Object eval(String cmd,LuanTable env) { | |
154 try { | 158 try { |
155 LuanFunction fn = BasicLib.load(this,cmd,"eval",new LuanTable(),true); | 159 LuanFunction fn = BasicLib.load(this,cmd,"eval",env,true); |
156 return call(fn); | 160 return call(fn); |
157 } catch(LuanException e) { | 161 } catch(LuanException e) { |
158 throw new RuntimeException(e); | 162 throw new RuntimeException(e); |
159 } | 163 } |
160 } | 164 } |