Editorial: move non-normative statements about CRLF to a note#3807
Editorial: move non-normative statements about CRLF to a note#3807michaelficarra wants to merge 2 commits intomainfrom
Conversation
|
The rendered spec preview for this PR is available as a single page at https://tc39.es/ecma262/pr/3807 and as multiple pages at https://tc39.es/ecma262/pr/3807/multipage . |
| <CR> <LF> | ||
| </emu-grammar> | ||
| <emu-note> | ||
| <p>The production <emu-grammar>LineTerminatorSequence :: <CR> <LF></emu-grammar> matches a sequence of code points that should collectively operate as a single line terminator, such as when reporting line numbers in diagnostics.</p> |
There was a problem hiding this comment.
Line terminator is defined as a set of four single code points, we should not be conflating it with line terminator sequence and claim multiple code points can be one line terminator. Something like this seems more appropriate:
| <p>The production <emu-grammar>LineTerminatorSequence :: <CR> <LF></emu-grammar> matches a sequence of code points that should collectively operate as a single line terminator, such as when reporting line numbers in diagnostics.</p> | |
| <p>Line numbers reported in diagnostics should be counted in terms of LineTerminatorSequences, not individual LineTerminators.</p> |
(I'm sure there's a nicer way to word this but you get the idea)
There was a problem hiding this comment.
I think I still prefer my wording. If I could, I would rename LineTerminatorSequence to LineTerminator and rename LineTerminator to something like LineTerminatorComponent. But these are their names, they're pretty well known, and I think it'd be too disruptive to do that. I think we just have to allow ourselves to keep the concepts of LineTerminator and "line terminator" separate in our heads.
Also clarified that it's not a "single |SourceCharacter|", whatever that means. It's a single logical line terminator.