Mercurial Hosting > luan
comparison src/luan/interp/BinaryOpExpr.java @ 36:2a35154aec14
implement more basic lib functions
git-svn-id: https://luan-java.googlecode.com/svn/trunk@37 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 18 Dec 2012 09:53:42 +0000 |
parents | e51906de0f11 |
children | 8a57ebfdfd78 |
comparison
equal
deleted
inserted
replaced
35:e51906de0f11 | 36:2a35154aec14 |
---|---|
14 this.op1 = op1; | 14 this.op1 = op1; |
15 this.op2 = op2; | 15 this.op2 = op2; |
16 } | 16 } |
17 | 17 |
18 static final LuaFunction getBinHandler(String op,Object o1,Object o2) throws LuaException { | 18 static final LuaFunction getBinHandler(String op,Object o1,Object o2) throws LuaException { |
19 LuaFunction f1 = Utils.getHandler(op,o1); | 19 LuaFunction f1 = Utils.getHandlerFunction(op,o1); |
20 if( f1 != null ) | 20 if( f1 != null ) |
21 return f1; | 21 return f1; |
22 return Utils.getHandler(op,o2); | 22 return Utils.getHandlerFunction(op,o2); |
23 } | 23 } |
24 | 24 |
25 static final Object arithmetic(LuaStateImpl lua,String op,Object o1,Object o2) throws LuaException { | 25 static final Object arithmetic(LuaStateImpl lua,String op,Object o1,Object o2) throws LuaException { |
26 LuaFunction fn = getBinHandler(op,o1,o2); | 26 LuaFunction fn = getBinHandler(op,o1,o2); |
27 if( fn != null ) | 27 if( fn != null ) |