From cc169da2c25e215c6276dfadd68326980cf09ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 18 Dec 2020 17:47:36 -0800 Subject: [PATCH] clean up node grammar + allow slashdash spaces --- SPEC.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SPEC.md b/SPEC.md index eb52bc2..83694a0 100644 --- a/SPEC.md +++ b/SPEC.md @@ -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 - [\{}<>;[]=,]