Mercurial Hosting > luan
view core/src/luan/impl/OrExpr.java @ 333:2b72947d421a
README.md edited online with Bitbucket
author | Hugo Teixeira <hugo.tech@gmail.com> |
---|---|
date | Wed, 25 Mar 2015 04:27:56 +0000 |
parents | 3dcb0f9bee82 |
children | bf5e62a9090c |
line wrap: on
line source
package luan.impl; import luan.Luan; import luan.LuanException; import luan.LuanSource; final class OrExpr extends BinaryOpExpr { OrExpr(LuanSource.Element se,Expr op1,Expr op2) { super(se,op1,op2); } @Override public Object eval(LuanStateImpl luan) throws LuanException { Object v1 = op1.eval(luan); return Luan.toBoolean(v1) ? v1 : op2.eval(luan); } }