Mercurial Hosting > luan
view core/src/luan/impl/IndexExpr.java @ 637:6ea90dc10375
bbcode parser now takes a quoter function
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Mar 2016 12:38:24 -0700 |
parents | 4723d22062ce |
children | 859c0dedc8b6 |
line wrap: on
line source
package luan.impl; import luan.LuanException; import luan.LuanElement; final class IndexExpr extends BinaryOpExpr { IndexExpr(LuanElement el,Expr op1,Expr op2) { super(el,op1,op2); } @Override public Object eval(LuanStateImpl luan) throws LuanException { Object o1 = op1.eval(luan); Object o2 = op2.eval(luan); luan.push(el,null); try { return luan.index(o1,o2); } finally { luan.pop(); } } }