nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f36a8ec
)
nitj: implement ANotExpr
author
Alexandre Terrasa
<alexandre@moz-code.org>
Fri, 10 Jul 2015 06:02:43 +0000
(
02:02
-0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Tue, 21 Jul 2015 21:23:22 +0000
(17:23 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/compiler/java_compiler.nit
patch
|
blob
|
history
diff --git
a/src/compiler/java_compiler.nit
b/src/compiler/java_compiler.nit
index
2077fa5
..
0806fc8
100644
(file)
--- a/
src/compiler/java_compiler.nit
+++ b/
src/compiler/java_compiler.nit
@@
-1973,6
+1973,14
@@
redef class AVarAssignExpr
end
end
+
+redef class ANotExpr
+ redef fun expr(v) do
+ var cond = v.expr_bool(self.n_expr)
+ return v.new_expr("!{cond}", self.mtype.as(not null))
+ end
+end
+
redef class AIntExpr
redef fun expr(v) do return v.int_instance(self.value.as(not null))
end