Skip to content

Commit 7a08d2f

Browse files
committed
Split up WHITESPACE
I'm splitting out `HORIZONTAL_WHITESPACE` to make it easier to connect the concept in frontmatter with `WHITESPACE`. In doing this, I found it awkward to only pull out part when the comments are there. I either needed a redundant comment to start a section, re-arrange out of order from Unicode, or split out all classes. I did the latter.
1 parent 866d324 commit 7a08d2f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/whitespace.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@ r[lex.whitespace]
44
r[whitespace.syntax]
55
```grammar,lexer
66
@root WHITESPACE ->
7-
// end of line
7+
END_OF_LINE
8+
| IGNORABLE_CODE_POINT
9+
| HORIZONTAL_WHITESPACE
10+
11+
END_OF_LINE ->
812
LF
913
| U+000B // vertical tabulation
1014
| U+000C // form feed
1115
| CR
1216
| U+0085 // Unicode next line
1317
| U+2028 // Unicode LINE SEPARATOR
1418
| U+2029 // Unicode PARAGRAPH SEPARATOR
15-
// Ignorable Code Point
16-
| U+200E // Unicode LEFT-TO-RIGHT MARK
19+
20+
IGNORABLE_CODE_POINT ->
21+
U+200E // Unicode LEFT-TO-RIGHT MARK
1722
| U+200F // Unicode RIGHT-TO-LEFT MARK
18-
// horizontal whitespace
19-
| TAB
23+
24+
HORIZONTAL_WHITESPACE ->
25+
TAB
2026
| U+0020 // space ' '
2127
2228
TAB -> U+0009 // horizontal tab ('\t')

0 commit comments

Comments
 (0)