Mercurial Hosting > luan
diff src/luan/interp/BinaryOpExpr.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 | 64ecb7a3aad7 |
line wrap: on
line diff
--- a/src/luan/interp/BinaryOpExpr.java Thu Dec 20 02:54:06 2012 +0000 +++ b/src/luan/interp/BinaryOpExpr.java Fri Dec 21 10:45:54 2012 +0000 @@ -4,15 +4,21 @@ import luan.LuaTable; import luan.LuaFunction; import luan.LuaException; +import luan.LuaSource; -abstract class BinaryOpExpr implements Expr { +abstract class BinaryOpExpr extends CodeImpl implements Expr { final Expr op1; final Expr op2; - BinaryOpExpr(Expr op1,Expr op2) { + BinaryOpExpr(LuaSource.Element se,Expr op1,Expr op2) { + super(se); this.op1 = op1; this.op2 = op2; } + Object arithmetic(LuaStateImpl lua,String op,Object o1,Object o2) throws LuaException { + return lua.arithmetic(se(),"__mod",o1,o2); + } + }