Remove mandatory node-space before slashdash and children block (#499)

* Remove mandatory node-space before slashdash

Fix #495

* Add tests

* Fix more tests

* Fix tests again
This commit is contained in:
Lars Willighagen 2025-01-29 01:48:09 +01:00 committed by GitHub
parent c54ebd9473
commit 84911feb11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 14 additions and 4 deletions

View File

@ -936,11 +936,11 @@ document := bom? version? nodes
nodes := (line-space* node)* line-space*
base-node := slashdash? type? node-space* string
(node-space+ slashdash? node-prop-or-arg)*
(node-space* (node-space | slashdash) node-prop-or-arg)*
// slashdashed node-children must always be after props and args.
(node-space+ slashdash node-children)*
(node-space+ node-children)?
(node-space+ slashdash node-children)*
(node-space* slashdash node-children)*
(node-space* node-children)?
(node-space* slashdash node-children)*
node-space*
node := base-node node-terminator
final-node := base-node node-terminator?

View File

@ -0,0 +1,3 @@
foo123 {
bar
}

View File

@ -0,0 +1 @@
node string

View File

@ -0,0 +1,2 @@
node string
node string

View File

@ -0,0 +1 @@
node string

View File

@ -0,0 +1,2 @@
node "string"/-{}
node "string" {}/-{}

View File

@ -0,0 +1 @@
node "string"/-foo=1