Mercurial Hosting > luan
comparison core/src/luan/impl/IndexExpr.java @ 575:7c3ad6db8ac3
make LuanState.JAVA private
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 13 Jul 2015 18:34:31 -0600 |
parents | 2da0bcb979b5 |
children | 4723d22062ce |
comparison
equal
deleted
inserted
replaced
574:6cc2f047019b | 575:7c3ad6db8ac3 |
---|---|
1 package luan.impl; | 1 package luan.impl; |
2 | 2 |
3 import luan.LuanException; | 3 import luan.LuanException; |
4 import luan.LuanTable; | |
5 import luan.LuanElement; | 4 import luan.LuanElement; |
6 | 5 |
7 | 6 |
8 final class IndexExpr extends BinaryOpExpr { | 7 final class IndexExpr extends BinaryOpExpr { |
9 | 8 |
10 IndexExpr(LuanElement el,Expr op1,Expr op2) { | 9 IndexExpr(LuanElement el,Expr op1,Expr op2) { |
11 super(el,op1,op2); | 10 super(el,op1,op2); |
12 } | 11 } |
13 | 12 |
14 @Override public Object eval(LuanStateImpl luan) throws LuanException { | 13 @Override public Object eval(LuanStateImpl luan) throws LuanException { |
15 return LuanTable.index( luan.bit(el()), op1.eval(luan), op2.eval(luan) ); | 14 return luan.bit(el()).index( op1.eval(luan), op2.eval(luan) ); |
16 } | 15 } |
17 | 16 |
18 } | 17 } |