Skip to content

Commit 23918bd

Browse files
authored
Make line-space a superset of node-space (#440)
* Allow escline everywhere * escline tests
1 parent 6906771 commit 23918bd

11 files changed

+27
-2
lines changed

SPEC.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -910,14 +910,14 @@ unicode-space := See Table (All White_Space unicode characters which are not `ne
910910
single-line-comment := '//' ^newline* (newline | eof)
911911
multi-line-comment := '/*' commented-block
912912
commented-block := '*/' | (multi-line-comment | '*' | '/' | [^*/]+) commented-block
913-
slashdash := '/-' (node-space | line-space)*
913+
slashdash := '/-' line-space*
914914
915915
// Whitespace
916916
ws := unicode-space | multi-line-comment
917917
escline := '\\' ws* (single-line-comment | newline | eof)
918918
newline := See Table (All Newline White_Space)
919919
// Whitespace where newlines are allowed.
920-
line-space := newline | ws | single-line-comment
920+
line-space := node-space | newline | single-line-comment
921921
// Whitespace within nodes, where newline-ish things must be esclined.
922922
node-space := ws* escline ws* | ws+
923923
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node
2+
node
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parent {
2+
child
3+
child
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(type)node
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node; \
2+
node
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
\
2+
3+
node
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parent {
2+
child
3+
\ // comment
4+
child
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\
2+
(type)node
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node
2+
\
3+
/-
4+
node

0 commit comments

Comments
 (0)