Closed lucaswerkmeister closed 10 years ago
Given that the line breaks for comments are handled in only one place – fastForwardComment
– I could actually implement a special rule only for comments there. Or do I need this for other tokens as well?
Currently, multi-line comments enforce a line break. However, you can obviously stick a line comment anywhere – even between tokens that disallow a line break completely. This happens, for example, in ceylon.language (here), and it blows up the formatter because the intersection of the two ranges of allowed line breaks is empty.
However, if I simply allow line breaks before multi-line comments (turn the range from
1..3
into0..3
), then0
becomes the default value, which I don’t really like. I’d like to have an allowed range of0..3
, but a default value of1
. As1
is neither of the borders, this isn’t possible in the current model.