Mercurial Hosting > luan
view core/src/luan/impl/NotExpr.java @ 379:e9e445e28f0b
add error checking to Hosting
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 20 Apr 2015 12:24:54 -0600 |
parents | 1fada5587469 |
children | b48cfa14ba60 |
line wrap: on
line source
package luan.impl; import luan.Luan; import luan.LuanException; import luan.LuanSource; final class NotExpr extends UnaryOpExpr { NotExpr(LuanSource.Element se,Expr op) { super(se,op); } @Override public Object eval(LuanStateImpl luan) throws LuanException { return !luan.bit(op.se()).checkBoolean( op.eval(luan) ); } @Override public String toString() { return "(NotExpr "+op+")"; } }