Skip to content

Commit 866d324

Browse files
committed
Revert "Reformat whitespace list for consistency"
This reverts commit 60eb145. This re-formats our Whitespace to be centered on Unicode's defintion. This makes it easy to compare with the standard and helps with Frontmatter. Unlike regular Rust, Frontmatter cares about the type of Whitespace. Even if we want to duplicate the definition, having them formatted similarly makes them easy to compare.
1 parent e122eef commit 866d324

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

src/whitespace.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,26 @@ r[lex.whitespace]
44
r[whitespace.syntax]
55
```grammar,lexer
66
@root WHITESPACE ->
7-
U+0009 // Horizontal tab, `'\t'`
8-
| U+000A // Line feed, `'\n'`
9-
| U+000B // Vertical tab
10-
| U+000C // Form feed
11-
| U+000D // Carriage return, `'\r'`
12-
| U+0020 // Space, `' '`
13-
| U+0085 // Next line
14-
| U+200E // Left-to-right mark
15-
| U+200F // Right-to-left mark
16-
| U+2028 // Line separator
17-
| U+2029 // Paragraph separator
18-
19-
TAB -> U+0009 // Horizontal tab, `'\t'`
20-
21-
LF -> U+000A // Line feed, `'\n'`
22-
23-
CR -> U+000D // Carriage return, `'\r'`
7+
// end of line
8+
LF
9+
| U+000B // vertical tabulation
10+
| U+000C // form feed
11+
| CR
12+
| U+0085 // Unicode next line
13+
| U+2028 // Unicode LINE SEPARATOR
14+
| U+2029 // Unicode PARAGRAPH SEPARATOR
15+
// Ignorable Code Point
16+
| U+200E // Unicode LEFT-TO-RIGHT MARK
17+
| U+200F // Unicode RIGHT-TO-LEFT MARK
18+
// horizontal whitespace
19+
| TAB
20+
| U+0020 // space ' '
21+
22+
TAB -> U+0009 // horizontal tab ('\t')
23+
24+
LF -> U+000A // line feed ('\n')
25+
26+
CR -> U+000D // carriage return ('\r')
2427
```
2528

2629
r[lex.whitespace.intro]

0 commit comments

Comments
 (0)