Mercurial Hosting > luan
diff src/luan/interp/LeExpr.java @ 49:8ede219cd111
add WebShell
git-svn-id: https://luan-java.googlecode.com/svn/trunk@50 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 28 Dec 2012 19:35:04 +0000 |
parents | 64ecb7a3aad7 |
children | 6ca02b188dba |
line wrap: on
line diff
--- a/src/luan/interp/LeExpr.java Fri Dec 28 03:29:12 2012 +0000 +++ b/src/luan/interp/LeExpr.java Fri Dec 28 19:35:04 2012 +0000 @@ -12,9 +12,9 @@ super(se,op1,op2); } - @Override public Object eval(LuanStateImpl lua) throws LuanException { - Object o1 = op1.eval(lua); - Object o2 = op2.eval(lua); + @Override public Object eval(LuanStateImpl luan) throws LuanException { + Object o1 = op1.eval(luan); + Object o2 = op2.eval(luan); if( o1 instanceof Number && o2 instanceof Number ) { Number n1 = (Number)o1; Number n2 = (Number)o2; @@ -25,12 +25,12 @@ String s2 = (String)o2; return s1.compareTo(s2) <= 0; } - LuanFunction fn = lua.getBinHandler(se,"__le",o1,o2); + LuanFunction fn = luan.getBinHandler(se,"__le",o1,o2); if( fn != null ) - return Luan.toBoolean( Luan.first(lua.call(fn,se,"__le",o1,o2)) ); - fn = lua.getBinHandler(se,"__lt",o1,o2); + return Luan.toBoolean( Luan.first(luan.call(fn,se,"__le",o1,o2)) ); + fn = luan.getBinHandler(se,"__lt",o1,o2); if( fn != null ) - return !Luan.toBoolean( Luan.first(lua.call(fn,se,"__lt",o2,o1)) ); - throw new LuanException( lua, se, "attempt to compare " + Luan.type(o1) + " with " + Luan.type(o2) ); + return !Luan.toBoolean( Luan.first(luan.call(fn,se,"__lt",o2,o1)) ); + throw new LuanException( luan, se, "attempt to compare " + Luan.type(o1) + " with " + Luan.type(o2) ); } }