Closed lucaswerkmeister closed 10 years ago
I wrote the following code a while back:
variable Integer offset = options.indentMode.indent( tokenStack.fold(0, (Integer partial, FormattingContext elem) => partial + elem.postIndent) ).size;
(source, linked to the commit that introduced the code). The formatter turns this into:
variable Integer offset = options.indentMode.indent( tokenStack.fold(0, (Integer partial, FormattingContext elem) => partial + elem.postIndent)).size;
because a PositionalArgumentList doesn’t allow linebreaks before the closing parenthesis.
PositionalArgumentList
I’m not sure if that’s right.
After a bit more considering, I think that linebreaks should be allowed before a ).
)
I wrote the following code a while back:
(source, linked to the commit that introduced the code). The formatter turns this into:
because a
PositionalArgumentList
doesn’t allow linebreaks before the closing parenthesis.I’m not sure if that’s right.