comparison core/src/luan/impl/LtExpr.java @ 645:859c0dedc8b6

remove LuanSource
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Mar 2016 18:09:51 -0600
parents 4723d22062ce
children 8e8c30b72e9b
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.LuanFunction; 4 import luan.LuanFunction;
5 import luan.LuanException; 5 import luan.LuanException;
6 import luan.LuanElement;
7 6
8 7
9 final class LtExpr extends BinaryOpExpr { 8 final class LtExpr extends BinaryOpExpr {
10 9
11 LtExpr(LuanElement el,Expr op1,Expr op2) { 10 LtExpr(Expr op1,Expr op2) {
12 super(el,op1,op2); 11 super(op1,op2);
13 } 12 }
14 13
15 @Override public Object eval(LuanStateImpl luan) throws LuanException { 14 @Override public Object eval(LuanStateImpl luan) throws LuanException {
16 Object o1 = op1.eval(luan); 15 Object o1 = op1.eval(luan);
17 Object o2 = op2.eval(luan); 16 Object o2 = op2.eval(luan);
18 luan.push(el,null); 17 return luan.isLessThan(o1,o2);
19 try {
20 return luan.isLessThan(o1,o2);
21 } finally {
22 luan.pop();
23 }
24 } 18 }
25 } 19 }