Mercurial Hosting > luan
comparison src/luan/interp/NotExpr.java @ 31:5cf15507d77e
separate interpreter from interface
git-svn-id: https://luan-java.googlecode.com/svn/trunk@32 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 13 Dec 2012 02:50:04 +0000 |
parents | b7d7069fee58 |
children | e3624b7cd603 |
comparison
equal
deleted
inserted
replaced
30:8d8f4f5caef4 | 31:5cf15507d77e |
---|---|
1 package luan.interp; | 1 package luan.interp; |
2 | 2 |
3 import luan.Lua; | 3 import luan.Lua; |
4 import luan.LuaException; | 4 import luan.LuaException; |
5 import luan.LuaState; | |
6 | 5 |
7 | 6 |
8 final class NotExpr extends UnaryOpExpr { | 7 final class NotExpr extends UnaryOpExpr { |
9 | 8 |
10 NotExpr(Expr op) { | 9 NotExpr(Expr op) { |
11 super(op); | 10 super(op); |
12 } | 11 } |
13 | 12 |
14 @Override public Object eval(LuaState lua) throws LuaException { | 13 @Override public Object eval(LuaStateImpl lua) throws LuaException { |
15 return !Lua.toBoolean(op.eval(lua)); | 14 return !Lua.toBoolean(op.eval(lua)); |
16 } | 15 } |
17 } | 16 } |