Mercurial Hosting > luan
comparison core/src/luan/impl/OrExpr.java @ 645:859c0dedc8b6
remove LuanSource
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Mar 2016 18:09:51 -0600 |
parents | b48cfa14ba60 |
children | 37f0cf43f191 |
comparison
equal
deleted
inserted
replaced
644:ba1e318377c5 | 645:859c0dedc8b6 |
---|---|
1 package luan.impl; | 1 package luan.impl; |
2 | 2 |
3 import luan.Luan; | 3 import luan.Luan; |
4 import luan.LuanException; | 4 import luan.LuanException; |
5 import luan.LuanElement; | |
6 | 5 |
7 | 6 |
8 final class OrExpr extends BinaryOpExpr { | 7 final class OrExpr extends BinaryOpExpr { |
9 | 8 |
10 OrExpr(LuanElement se,Expr op1,Expr op2) { | 9 OrExpr(Expr op1,Expr op2) { |
11 super(se,op1,op2); | 10 super(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 Object v1 = op1.eval(luan); | 14 Object v1 = op1.eval(luan); |
16 return v1 != null && !Boolean.FALSE.equals(v1) ? v1 : op2.eval(luan); | 15 return v1 != null && !Boolean.FALSE.equals(v1) ? v1 : op2.eval(luan); |