Mercurial Hosting > luan
comparison core/src/luan/LuanState.java @ 694:b620b8e1010f
remove Luan.load() allow_expression param and add Luan.eval()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 20 Apr 2016 20:56:08 -0600 |
parents | d3e5414bdf4c |
children |
comparison
equal
deleted
inserted
replaced
693:ca169567ce07 | 694:b620b8e1010f |
---|---|
50 if( c != null ) | 50 if( c != null ) |
51 c.close(); | 51 c.close(); |
52 } | 52 } |
53 onClose.clear(); | 53 onClose.clear(); |
54 } | 54 } |
55 | 55 /* |
56 public final Object eval(String cmd) throws LuanException { | 56 public final Object eval(String cmd) throws LuanException { |
57 return eval(cmd,new LuanTable()); | 57 return eval(cmd,new LuanTable()); |
58 } | 58 } |
59 | 59 |
60 public final Object eval(String cmd,LuanTable env) throws LuanException { | 60 public final Object eval(String cmd,LuanTable env) throws LuanException { |
61 LuanFunction fn = BasicLuan.load(this,cmd,"eval",env,true); | 61 LuanFunction fn = BasicLuan.load(this,cmd,"eval",env,true); |
62 return fn.call(this); | 62 return fn.call(this); |
63 } | 63 } |
64 | 64 */ |
65 | 65 |
66 public String toString(Object obj) throws LuanException { | 66 public String toString(Object obj) throws LuanException { |
67 if( obj instanceof LuanTable ) { | 67 if( obj instanceof LuanTable ) { |
68 LuanTable tbl = (LuanTable)obj; | 68 LuanTable tbl = (LuanTable)obj; |
69 return tbl.toString(this); | 69 return tbl.toString(this); |