comparison core/src/luan/LuanState.java @ 574:6cc2f047019b

remove LuanState.call()
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 13 Jul 2015 12:31:53 -0600
parents f1601a4ce1aa
children 7c3ad6db8ac3
comparison
equal deleted inserted replaced
573:894f991baac5 574:6cc2f047019b
58 return eval(cmd,new LuanTable()); 58 return eval(cmd,new LuanTable());
59 } 59 }
60 60
61 public final Object eval(String cmd,LuanTable env) throws LuanException { 61 public final Object eval(String cmd,LuanTable env) throws LuanException {
62 LuanFunction fn = BasicLuan.load(this,cmd,"eval",env,true); 62 LuanFunction fn = BasicLuan.load(this,cmd,"eval",env,true);
63 return call(fn); 63 return fn.call(this);
64 } 64 }
65 65
66 public final LuanBit bit(LuanElement el) { 66 public final LuanBit bit(LuanElement el) {
67 return new LuanBit(this,el); 67 return new LuanBit(this,el);
68 } 68 }
71 71
72 public final LuanBit JAVA = bit(null); 72 public final LuanBit JAVA = bit(null);
73 73
74 public LuanException exception(Object msg) throws LuanException { 74 public LuanException exception(Object msg) throws LuanException {
75 return JAVA.exception(msg); 75 return JAVA.exception(msg);
76 }
77
78 public Object call(LuanFunction fn) throws LuanException {
79 return call(fn,null,LuanFunction.NOTHING);
80 }
81
82 public Object call(LuanFunction fn,String fnName) throws LuanException {
83 return call(fn,fnName,LuanFunction.NOTHING);
84 }
85
86 public Object call(LuanFunction fn,Object[] args) throws LuanException {
87 return call(fn,null,args);
88 }
89
90 public Object call(LuanFunction fn,String fnName,Object[] args) throws LuanException {
91 return JAVA.call(fn,fnName,args);
92 } 76 }
93 77
94 public Boolean checkBoolean(Object obj) throws LuanException { 78 public Boolean checkBoolean(Object obj) throws LuanException {
95 return JAVA.checkBoolean(obj); 79 return JAVA.checkBoolean(obj);
96 } 80 }