comparison 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
comparison
equal deleted inserted replaced
39:e5bcb1eeafc1 40:e3624b7cd603
2 2
3 import luan.Lua; 3 import luan.Lua;
4 import luan.LuaTable; 4 import luan.LuaTable;
5 import luan.LuaFunction; 5 import luan.LuaFunction;
6 import luan.LuaException; 6 import luan.LuaException;
7 import luan.LuaSource;
7 8
8 9
9 abstract class BinaryOpExpr implements Expr { 10 abstract class BinaryOpExpr extends CodeImpl implements Expr {
10 final Expr op1; 11 final Expr op1;
11 final Expr op2; 12 final Expr op2;
12 13
13 BinaryOpExpr(Expr op1,Expr op2) { 14 BinaryOpExpr(LuaSource.Element se,Expr op1,Expr op2) {
15 super(se);
14 this.op1 = op1; 16 this.op1 = op1;
15 this.op2 = op2; 17 this.op2 = op2;
16 } 18 }
17 19
20 Object arithmetic(LuaStateImpl lua,String op,Object o1,Object o2) throws LuaException {
21 return lua.arithmetic(se(),"__mod",o1,o2);
22 }
23
18 } 24 }