Mercurial Hosting > luan
diff src/luan/tools/WebShell.java @ 52:0c0f2b107099
add WebRun
git-svn-id: https://luan-java.googlecode.com/svn/trunk@53 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 31 Dec 2012 03:15:20 +0000 |
parents | 28dfd91a816c |
children | 5c9cadd0acce |
line wrap: on
line diff
--- a/src/luan/tools/WebShell.java Fri Dec 28 20:43:06 2012 +0000 +++ b/src/luan/tools/WebShell.java Mon Dec 31 03:15:20 2012 +0000 @@ -18,9 +18,6 @@ import luan.LuanException; import luan.interp.LuanCompiler; import luan.lib.BasicLib; -import luan.lib.JavaLib; -import luan.lib.StringLib; -import luan.lib.TableLib; import luan.lib.HtmlLib; @@ -28,18 +25,11 @@ private static final Logger logger = LoggerFactory.getLogger(WebShell.class); protected LuanState newLuanState() throws LuanException { - LuanState luan = LuanCompiler.newLuanState(); - BasicLib.register(luan); - JavaLib.register(luan); - StringLib.register(luan); - TableLib.register(luan); - HtmlLib.register(luan); - return luan; + return CmdLine.newStandardLuan(); } protected Object[] eval(LuanState luan,String cmd) throws LuanException { - LuanFunction fn = BasicLib.load(luan,cmd,"WebShell"); - return luan.call(fn,null,null); + return CmdLine.eval(luan,cmd,"WebShell"); } protected void service(HttpServletRequest request,HttpServletResponse response)