Closed lucaswerkmeister closed 10 years ago
/*
handle the part before this token:
fast-forward, intersect allowed line breaks, write out line breaks
*/
intersectAllowedLineBreaks(lineBreaksBefore, false);
fastForward((AntlrToken? current) { ...
});
for (i in 0:lineBreakAmount(givenLineBreaks)) {
tokenQueue.add(LineBreak());
}
I like how I managed to write the correct order in the comment and then implemented the wrong order :D
The formatter turns
into
because the
case
token declares that it must have a line break before it, and theFormattingWriter
applies that between the}
and the// comment
as well.