nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb7670e
)
pretty: workaround a bug with a missing `else`
author
Jean Privat
<jean@pryen.org>
Fri, 24 Apr 2015 11:19:21 +0000
(18:19 +0700)
committer
Jean Privat
<jean@pryen.org>
Mon, 4 May 2015 20:08:12 +0000
(16:08 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/pretty.nit
patch
|
blob
|
history
diff --git
a/src/pretty.nit
b/src/pretty.nit
index
b4a14b3
..
20c3550
100644
(file)
--- a/
src/pretty.nit
+++ b/
src/pretty.nit
@@
-1287,7
+1287,10
@@
redef class AIfExpr
end
v.consume_comments
- if has_else(v) then
+
+ # FIXME: for some unknown reasons, has_else can be true even if
+ # there is no `else` keyword but a `end` instead.
+ if has_else(v) and v.current_token isa TKwelse then
v.indent -= 1
v.addt