You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is a super minor issue. It's about Pretty printing. I would love to have a line break (\n) after every item of a list. That means I would like to have something like Example = '' nestnl(Lst)\n ''. Lst = 'Item,'\n'Item'. where Lst should be replaced by a list.
I can write Example = '' nestnl(Lst2)\n ''. Lst2 = Item++',\n'. which has two draw backs (a) it requires a line break for parsing as well (not only when pretty printing) (b) the outcome looks like " Item, Item "; that means nesting is not preserved.
Again: really only on my wish list; nothing major.
The text was updated successfully, but these errors were encountered:
It's not exactly what you suggest, but have you tried the {line} directive on rules? Here is the description from the docs:
A common situation arises when you want to place all instances of a construct on separate lines (unless they fit together). To specify this behaviour you can add a line annotation to the relevant rule. It is equivalent to placing a \n at the beginning of each alternative in the rule.
Peter Höfner says:
this is a super minor issue. It's about Pretty printing. I would love to have a line break (\n) after every item of a list. That means I would like to have something like Example = '' nestnl(Lst)\n ''. Lst = 'Item,'\n'Item'. where Lst should be replaced by a list.
I can write Example = '' nestnl(Lst2)\n ''. Lst2 = Item++',\n'. which has two draw backs (a) it requires a line break for parsing as well (not only when pretty printing) (b) the outcome looks like " Item, Item "; that means nesting is not preserved.
Again: really only on my wish list; nothing major.
The text was updated successfully, but these errors were encountered: