clean up node grammar + allow slashdash spaces

This commit is contained in:
Kat Marchán 2020-12-18 17:47:36 -08:00
parent 144f8d775f
commit cc169da2c2
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 5 additions and 5 deletions

10
SPEC.md
View File

@ -290,13 +290,13 @@ Note that for the purpose of new lines, CRLF is considered _a single newline_.
## Full Grammar
```
// FIXME: I don't... think this is quite right?
nodes := linespace* (node (newline nodes)? linespace*)?
nodes := linespace* (node nodes?)? linespace*
node := '/-'? identifier (node-space node-props-and-args)* (node-space node-document)? single-line-comment?
node-props-and-args := '/-'? prop | value
node-children := '/-'? '{' nodes '}'
node := '/-'? ws* identifier (node-space node-props-and-args)* (node-terminator | (node-space node-children))
node-props-and-args := '/-'? ws* (prop | value)
node-children := '/-'? ws* '{' nodes '}'
node-space := ws* escline ws* | ws+
node-terminator := single-line-comment | newline | ';'
identifier := (identifier-char - digit - [<>]) identifier-char* | string
identifier-char := unicode - digit - linespace - [\{}<>;[]=,]