Mercurial Hosting > luan
comparison core/src/luan/impl/ConcatExpr.java @ 509:e3b0846dc2ef
throw exception for invalid indexes of string, binary, or java
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 22 May 2015 02:02:49 -0600 |
parents | b48cfa14ba60 |
children | f1601a4ce1aa |
comparison
equal
deleted
inserted
replaced
508:9218f9cf45d3 | 509:e3b0846dc2ef |
---|---|
18 Object o2 = op2.eval(luan); | 18 Object o2 = op2.eval(luan); |
19 LuanBit bit = luan.bit(el); | 19 LuanBit bit = luan.bit(el); |
20 LuanFunction fn = bit.getBinHandler("__concat",o1,o2); | 20 LuanFunction fn = bit.getBinHandler("__concat",o1,o2); |
21 if( fn != null ) | 21 if( fn != null ) |
22 return Luan.first(bit.call(fn,"__concat",new Object[]{o1,o2})); | 22 return Luan.first(bit.call(fn,"__concat",new Object[]{o1,o2})); |
23 String s1 = luan.bit(op1.el()).toString(o1); | 23 String s1 = luan.toString(o1); |
24 String s2 = luan.bit(op2.el()).toString(o2); | 24 String s2 = luan.toString(o2); |
25 return s1 + s2; | 25 return s1 + s2; |
26 } | 26 } |
27 } | 27 } |