Mercurial Hosting > luan
diff src/luan/interp/SubExpr.java @ 40:e3624b7cd603
implement stack trace
git-svn-id: https://luan-java.googlecode.com/svn/trunk@41 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 21 Dec 2012 10:45:54 +0000 |
parents | 8a57ebfdfd78 |
children | 57054fa43189 |
line wrap: on
line diff
--- a/src/luan/interp/SubExpr.java Thu Dec 20 02:54:06 2012 +0000 +++ b/src/luan/interp/SubExpr.java Fri Dec 21 10:45:54 2012 +0000 @@ -3,12 +3,13 @@ import luan.Lua; import luan.LuaNumber; import luan.LuaException; +import luan.LuaSource; final class SubExpr extends BinaryOpExpr { - SubExpr(Expr op1,Expr op2) { - super(op1,op2); + SubExpr(LuaSource.Element se,Expr op1,Expr op2) { + super(se,op1,op2); } @Override public Object eval(LuaStateImpl lua) throws LuaException { @@ -18,6 +19,6 @@ LuaNumber n2 = Lua.toNumber(o2); if( n1 != null && n2 != null ) return new LuaNumber( n1.value() - n2.value() ); - return lua.arithmetic("__sub",o1,o2); + return arithmetic(lua,"__sub",o1,o2); } }