mirror of https://github.com/kdl-org/kdl.git
Make last semicolon optional for inline nodes
Fixes: https://github.com/kdl-org/kdl/issues/341
This commit is contained in:
parent
5a7b339ed4
commit
c8488db13e
|
|
@ -43,6 +43,9 @@
|
||||||
Values](https://unicode.org/glossary/#unicode_scalar_value) only, including
|
Values](https://unicode.org/glossary/#unicode_scalar_value) only, including
|
||||||
values used in string escapes (`\u{}`). All KDL documents and string values
|
values used in string escapes (`\u{}`). All KDL documents and string values
|
||||||
should be valid UTF-8 now, as was intended.
|
should be valid UTF-8 now, as was intended.
|
||||||
|
* The last node in a child block no longer needs to be terminated with `;`,
|
||||||
|
even if the closing `}` is on the same line, so this is now a legal node:
|
||||||
|
`node {foo;bar;baz}`
|
||||||
|
|
||||||
### KQL
|
### KQL
|
||||||
|
|
||||||
|
|
|
||||||
6
SPEC.md
6
SPEC.md
|
|
@ -527,9 +527,11 @@ node-space := plain-node-space+ ('/-' plain-node-space* (node-prop-or-arg | node
|
||||||
required-node-space := node-space* plain-node-space+
|
required-node-space := node-space* plain-node-space+
|
||||||
optional-node-space := node-space*
|
optional-node-space := node-space*
|
||||||
|
|
||||||
node := type? identifier (required-node-space node-prop-or-arg)* (required-node-space node-children)? optional-node-space node-terminator
|
base-node := type? identifier (required-node-space node-prop-or-arg)* (required-node-space node-children)?
|
||||||
|
node := base-node optional-node-space node-terminator
|
||||||
|
final-node := base-node optional-node-space node-terminator?
|
||||||
node-prop-or-arg := prop | value
|
node-prop-or-arg := prop | value
|
||||||
node-children := '{' nodes '}'
|
node-children := '{' nodes final-node? '}'
|
||||||
node-terminator := single-line-comment | newline | ';' | eof
|
node-terminator := single-line-comment | newline | ';' | eof
|
||||||
|
|
||||||
identifier := string | bare-identifier
|
identifier := string | bare-identifier
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue