Mercurial Hosting > luan
view core/src/luan/impl/ConcatExpr.java @ 418:455784e2227d
remove C documentation from manual
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 30 Apr 2015 21:52:20 -0600 |
parents | 0d6098a29b3e |
children | b48cfa14ba60 |
line wrap: on
line source
package luan.impl; import luan.Luan; import luan.LuanFunction; import luan.LuanException; import luan.LuanSource; import luan.LuanBit; final class ConcatExpr extends BinaryOpExpr { ConcatExpr(LuanSource.Element se,Expr op1,Expr op2) { super(se,op1,op2); } @Override public Object eval(LuanStateImpl luan) throws LuanException { Object o1 = op1.eval(luan); Object o2 = op2.eval(luan); LuanBit bit = luan.bit(se); LuanFunction fn = bit.getBinHandler("__concat",o1,o2); if( fn != null ) return Luan.first(bit.call(fn,"__concat",new Object[]{o1,o2})); String s1 = luan.bit(op1.se()).toString(o1); String s2 = luan.bit(op2.se()).toString(o2); return s1 + s2; } }