Mercurial Hosting > luan
view core/src/luan/impl/AndExpr.java @ 443:bf5e62a9090c
remove toBoolean() and to_boolean()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 04 May 2015 14:55:51 -0600 |
parents | 3dcb0f9bee82 |
children | b48cfa14ba60 |
line wrap: on
line source
package luan.impl; import luan.Luan; import luan.LuanException; import luan.LuanSource; final class AndExpr extends BinaryOpExpr { AndExpr(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 v1 == null || Boolean.FALSE.equals(v1) ? v1 : op2.eval(luan); } }