Mercurial Hosting > luan
comparison core/src/luan/impl/IndexExpr.java @ 576:4723d22062ce
remove LuanBit
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 13 Jul 2015 20:38:26 -0600 |
parents | 7c3ad6db8ac3 |
children | 859c0dedc8b6 |
comparison
equal
deleted
inserted
replaced
575:7c3ad6db8ac3 | 576:4723d22062ce |
---|---|
9 IndexExpr(LuanElement el,Expr op1,Expr op2) { | 9 IndexExpr(LuanElement el,Expr op1,Expr op2) { |
10 super(el,op1,op2); | 10 super(el,op1,op2); |
11 } | 11 } |
12 | 12 |
13 @Override public Object eval(LuanStateImpl luan) throws LuanException { | 13 @Override public Object eval(LuanStateImpl luan) throws LuanException { |
14 return luan.bit(el()).index( op1.eval(luan), op2.eval(luan) ); | 14 Object o1 = op1.eval(luan); |
15 Object o2 = op2.eval(luan); | |
16 luan.push(el,null); | |
17 try { | |
18 return luan.index(o1,o2); | |
19 } finally { | |
20 luan.pop(); | |
21 } | |
15 } | 22 } |
16 | 23 |
17 } | 24 } |