Mercurial Hosting > luan
comparison core/src/luan/impl/NotExpr.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.LuanException; | 4 import luan.LuanException; |
5 import luan.LuanElement; | |
6 | 5 |
7 | 6 |
8 final class NotExpr extends UnaryOpExpr { | 7 final class NotExpr extends UnaryOpExpr { |
9 | 8 |
10 NotExpr(LuanElement el,Expr op) { | 9 NotExpr(Expr op) { |
11 super(el,op); | 10 super(op); |
12 } | 11 } |
13 | 12 |
14 @Override public Object eval(LuanStateImpl luan) throws LuanException { | 13 @Override public Object eval(LuanStateImpl luan) throws LuanException { |
15 return !luan.checkBoolean( op.eval(luan), op.el() ); | 14 return !luan.checkBoolean( op.eval(luan) ); |
16 } | 15 } |
17 | 16 |
18 @Override public String toString() { | 17 @Override public String toString() { |
19 return "(NotExpr "+op+")"; | 18 return "(NotExpr "+op+")"; |
20 } | 19 } |