nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2be8428
)
pretty: skip commas in ANodes
author
Jean Privat
<jean@pryen.org>
Fri, 24 Apr 2015 11:06:52 +0000
(18:06 +0700)
committer
Jean Privat
<jean@pryen.org>
Mon, 4 May 2015 20:08:12 +0000
(16:08 -0400)
I do not know why and by who the comma is skipped but in some case it
is still here. So force its removal if any.
For instance
~~~nit
foo(a, [b])
~~~
caused some issue
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
0dc4ffb
..
1bea99b
100644
(file)
--- a/
src/pretty.nit
+++ b/
src/pretty.nit
@@
-292,6
+292,8
@@
redef class ANodes[E]
for e in self do
var e_can_inline = v.can_inline(e)
+ if v.current_token isa TComma then v.skip
+
if e != first then
if not e_can_inline then
v.add ","