mirror of https://github.com/kdl-org/kdl.git
Allow node-space after slashdash and add a bunch more slashdash tests
This commit is contained in:
parent
75a0869a6c
commit
d9da35d560
2
SPEC.md
2
SPEC.md
|
|
@ -905,7 +905,7 @@ unicode-space := See Table (All White_Space unicode characters which are not `ne
|
|||
single-line-comment := '//' ^newline* (newline | eof)
|
||||
multi-line-comment := '/*' commented-block
|
||||
commented-block := '*/' | (multi-line-comment | '*' | '/' | [^*/]+) commented-block
|
||||
slashdash := '/-' line-space*
|
||||
slashdash := '/-' (node-space | line-space)*
|
||||
|
||||
// Whitespace
|
||||
ws := unicode-space | multi-line-comment
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
node arg2
|
||||
|
|
@ -0,0 +1 @@
|
|||
node arg1
|
||||
|
|
@ -0,0 +1 @@
|
|||
node2
|
||||
|
|
@ -0,0 +1 @@
|
|||
node foo bar
|
||||
|
|
@ -0,0 +1 @@
|
|||
node (ty)/-arg1 arg2
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(ty)/-node
|
||||
other-node
|
||||
|
|
@ -0,0 +1 @@
|
|||
node key=(ty)/-val other-arg
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
node {
|
||||
child1
|
||||
/-
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
node foo /-
|
||||
|
|
@ -0,0 +1 @@
|
|||
node key = /-val etc
|
||||
|
|
@ -0,0 +1 @@
|
|||
node foo /-;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
node /-\
|
||||
(ty)arg1 arg2
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
node arg1 /-\
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/-\
|
||||
node1
|
||||
node2
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
node foo /-
|
||||
not-a-node bar
|
||||
|
|
@ -0,0 +1 @@
|
|||
node (/-bad)nope
|
||||
|
|
@ -0,0 +1 @@
|
|||
(/-ty)node
|
||||
Loading…
Reference in New Issue