Mercurial Hosting > luan
diff src/luan/interp/FnCall.java @ 48:64ecb7a3aad7
rename Lua to Luan
git-svn-id: https://luan-java.googlecode.com/svn/trunk@49 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 28 Dec 2012 03:29:12 +0000 |
parents | e3624b7cd603 |
children | 8ede219cd111 |
line wrap: on
line diff
--- a/src/luan/interp/FnCall.java Thu Dec 27 04:36:44 2012 +0000 +++ b/src/luan/interp/FnCall.java Fri Dec 28 03:29:12 2012 +0000 @@ -1,9 +1,9 @@ package luan.interp; -import luan.Lua; -import luan.LuaFunction; -import luan.LuaException; -import luan.LuaSource; +import luan.Luan; +import luan.LuanFunction; +import luan.LuanException; +import luan.LuanSource; final class FnCall extends CodeImpl implements Expressions { @@ -11,25 +11,25 @@ final Expressions args; final String fnName; - FnCall(LuaSource.Element se,Expr fnExpr,Expressions args) { + FnCall(LuanSource.Element se,Expr fnExpr,Expressions args) { super(se); this.fnExpr = fnExpr; this.args = args; this.fnName = fnExpr.se().text(); } - @Override public Object[] eval(LuaStateImpl lua) throws LuaException { + @Override public Object[] eval(LuanStateImpl lua) throws LuanException { return call( lua, fnExpr.eval(lua) ); } - private Object[] call(LuaStateImpl lua,Object o) throws LuaException { - if( o instanceof LuaFunction ) { - LuaFunction fn = (LuaFunction)o; + private Object[] call(LuanStateImpl lua,Object o) throws LuanException { + if( o instanceof LuanFunction ) { + LuanFunction fn = (LuanFunction)o; return lua.call( fn, se, fnName, args.eval(lua) ); } Object h = lua.getHandler("__call",o); if( h != null ) return call(lua,h); - throw new LuaException( lua, se, "attempt to call a " + Lua.type(o) + " value" ); + throw new LuanException( lua, se, "attempt to call a " + Luan.type(o) + " value" ); } }