mirror of https://github.com/kdl-org/kdl.git
Make line-space a superset of node-space (#440)
* Allow escline everywhere * escline tests
This commit is contained in:
parent
69067719c7
commit
23918bd55d
4
SPEC.md
4
SPEC.md
|
|
@ -910,14 +910,14 @@ unicode-space := See Table (All White_Space unicode characters which are not `ne
|
||||||
single-line-comment := '//' ^newline* (newline | eof)
|
single-line-comment := '//' ^newline* (newline | eof)
|
||||||
multi-line-comment := '/*' commented-block
|
multi-line-comment := '/*' commented-block
|
||||||
commented-block := '*/' | (multi-line-comment | '*' | '/' | [^*/]+) commented-block
|
commented-block := '*/' | (multi-line-comment | '*' | '/' | [^*/]+) commented-block
|
||||||
slashdash := '/-' (node-space | line-space)*
|
slashdash := '/-' line-space*
|
||||||
|
|
||||||
// Whitespace
|
// Whitespace
|
||||||
ws := unicode-space | multi-line-comment
|
ws := unicode-space | multi-line-comment
|
||||||
escline := '\\' ws* (single-line-comment | newline | eof)
|
escline := '\\' ws* (single-line-comment | newline | eof)
|
||||||
newline := See Table (All Newline White_Space)
|
newline := See Table (All Newline White_Space)
|
||||||
// Whitespace where newlines are allowed.
|
// Whitespace where newlines are allowed.
|
||||||
line-space := newline | ws | single-line-comment
|
line-space := node-space | newline | single-line-comment
|
||||||
// Whitespace within nodes, where newline-ish things must be esclined.
|
// Whitespace within nodes, where newline-ish things must be esclined.
|
||||||
node-space := ws* escline ws* | ws+
|
node-space := ws* escline ws* | ws+
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
node
|
||||||
|
node
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
node
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent {
|
||||||
|
child
|
||||||
|
child
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
(type)node
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
node
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
node; \
|
||||||
|
node
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
\
|
||||||
|
|
||||||
|
node
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
parent {
|
||||||
|
child
|
||||||
|
\ // comment
|
||||||
|
child
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
\
|
||||||
|
(type)node
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
node
|
||||||
|
\
|
||||||
|
/-
|
||||||
|
node
|
||||||
Loading…
Reference in New Issue