Mercurial Hosting > luan
comparison core/src/luan/impl/NotExpr.java @ 171:3dcb0f9bee82
add core component
git-svn-id: https://luan-java.googlecode.com/svn/trunk@172 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Sun, 22 Jun 2014 05:41:22 +0000 |
parents | src/luan/impl/NotExpr.java@4eaee12f6c65 |
children | 2456ef7ada02 |
comparison
equal
deleted
inserted
replaced
170:7c792a328a83 | 171:3dcb0f9bee82 |
---|---|
1 package luan.impl; | |
2 | |
3 import luan.Luan; | |
4 import luan.LuanException; | |
5 import luan.LuanSource; | |
6 | |
7 | |
8 final class NotExpr extends UnaryOpExpr { | |
9 | |
10 NotExpr(LuanSource.Element se,Expr op) { | |
11 super(se,op); | |
12 } | |
13 | |
14 @Override public Object eval(LuanStateImpl luan) throws LuanException { | |
15 return !Luan.toBoolean(op.eval(luan)); | |
16 } | |
17 } |