Mercurial Hosting > luan
diff src/luan/interp/EqExpr.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 | a443637829c1 |
children | 8ede219cd111 |
line wrap: on
line diff
--- a/src/luan/interp/EqExpr.java Thu Dec 27 04:36:44 2012 +0000 +++ b/src/luan/interp/EqExpr.java Fri Dec 28 03:29:12 2012 +0000 @@ -1,19 +1,19 @@ package luan.interp; -import luan.Lua; -import luan.LuaFunction; -import luan.LuaTable; -import luan.LuaException; -import luan.LuaSource; +import luan.Luan; +import luan.LuanFunction; +import luan.LuanTable; +import luan.LuanException; +import luan.LuanSource; final class EqExpr extends BinaryOpExpr { - EqExpr(LuaSource.Element se,Expr op1,Expr op2) { + EqExpr(LuanSource.Element se,Expr op1,Expr op2) { super(se,op1,op2); } - @Override public Object eval(LuaStateImpl lua) throws LuaException { + @Override public Object eval(LuanStateImpl lua) throws LuanException { Object o1 = op1.eval(lua); Object o2 = op2.eval(lua); if( o1 == o2 || o1 != null && o1.equals(o2) ) @@ -25,14 +25,14 @@ } if( !o1.getClass().equals(o2.getClass()) ) return false; - LuaTable mt1 = lua.getMetatable(o1); - LuaTable mt2 = lua.getMetatable(o2); + LuanTable mt1 = lua.getMetatable(o1); + LuanTable mt2 = lua.getMetatable(o2); if( mt1==null || mt2==null ) return false; Object f = mt1.get("__eq"); if( f == null || !f.equals(mt2.get("__eq")) ) return null; - LuaFunction fn = lua.checkFunction(se,f); - return Lua.toBoolean( Lua.first(lua.call(fn,se,"__eq",o1,o2)) ); + LuanFunction fn = lua.checkFunction(se,f); + return Luan.toBoolean( Luan.first(lua.call(fn,se,"__eq",o1,o2)) ); } }