Mercurial Hosting > luan
view core/src/luan/impl/AndExpr.java @ 609:24b05963ba62
shell "clear" button now clears the session
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 09 Dec 2015 18:12:16 -0700 |
parents | b48cfa14ba60 |
children | 859c0dedc8b6 |
line wrap: on
line source
package luan.impl; import luan.Luan; import luan.LuanException; import luan.LuanElement; final class AndExpr extends BinaryOpExpr { AndExpr(LuanElement 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); } }