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
Copy file name to clipboardExpand all lines: src/input-format.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ r[input.crlf]
24
24
## CRLF normalization
25
25
26
26
Each pair of characters `U+000D` (CR) immediately followed by `U+000A` (LF) is replaced by a single `U+000A` (LF).
27
+
This happens once, not repeatedly, so after the normalization, there can still exist `U+000D` (CR) immediately followed by `U+000A` (LF) in the input (e.g. if the raw input contained "CR CR LF LF").
27
28
28
29
Other occurrences of the character `U+000D` (CR) are left in place (they are treated as [whitespace]).
Copy file name to clipboardExpand all lines: src/tokens.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,6 @@ Literals are tokens used in [literal expressions].
60
60
61
61
[^nsets]: The number of `#`s on each side of the same literal must be equivalent.
62
62
63
-
> [!NOTE]
64
-
> Character and string literal tokens never include the sequence of `U+000D` (CR) immediately followed by `U+000A` (LF): this pair would have been previously transformed into a single `U+000A` (LF).
65
63
66
64
#### ASCII escapes
67
65
@@ -198,9 +196,9 @@ which must be _escaped_ by a preceding `U+005C` character (`\`).
198
196
199
197
r[lex.token.literal.str.linefeed]
200
198
Line-breaks, represented by the character `U+000A` (LF), are allowed in string literals.
199
+
The character `U+000D` (CR) may not appear in a string literal.
201
200
When an unescaped `U+005C` character (`\`) occurs immediately before a line break, the line break does not appear in the string represented by the token.
202
201
See [String continuation escapes] for details.
203
-
The character `U+000D` (CR) may not appear in a string literal other than as part of such a string continuation escape.
204
202
205
203
r[lex.token.literal.char-escape]
206
204
#### Character escapes
@@ -323,9 +321,9 @@ below.
323
321
324
322
r[lex.token.str-byte.linefeed]
325
323
Line-breaks, represented by the character `U+000A` (LF), are allowed in byte string literals.
324
+
The character `U+000D` (CR) may not appear in a byte string literal.
326
325
When an unescaped `U+005C` character (`\`) occurs immediately before a line break, the line break does not appear in the string represented by the token.
327
326
See [String continuation escapes] for details.
328
-
The character `U+000D` (CR) may not appear in a byte string literal other than as part of such a string continuation escape.
329
327
330
328
r[lex.token.str-byte.escape]
331
329
Some additional _escapes_ are available in either byte or non-raw byte string
@@ -429,9 +427,9 @@ permitted within a C string.
429
427
430
428
r[lex.token.str-c.linefeed]
431
429
Line-breaks, represented by the character `U+000A` (LF), are allowed in C string literals.
430
+
The character `U+000D` (CR) may not appear in a C string literal.
432
431
When an unescaped `U+005C` character (`\`) occurs immediately before a line break, the line break does not appear in the string represented by the token.
433
432
See [String continuation escapes] for details.
434
-
The character `U+000D` (CR) may not appear in a C string literal other than as part of such a string continuation escape.
435
433
436
434
r[lex.token.str-c.escape]
437
435
Some additional _escapes_ are available in non-raw C string literals. An escape
0 commit comments