From adb3eb91c660de946a22c8e031b6378e3f897c5d Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 24 Apr 2015 18:06:52 +0700 Subject: [PATCH 1/1] pretty: skip commas in ANodes 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 --- src/pretty.nit | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pretty.nit b/src/pretty.nit index 0dc4ffb..1bea99b 100644 --- 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 "," -- 1.7.9.5