Replies: 3 comments 1 reply
-
Whitespace between the type annotation and the node name was discussed in #131, I'm not sure whether the first two examples were considered/discussed. |
Beta Was this translation helpful? Give feedback.
-
I just thought about the rule of having no spaces between |
Beta Was this translation helpful? Give feedback.
-
Curious about the problems you're having with tokenizing - is it not possible to emit WS tokens and handle those at the parser level? Is there something deeper in KDL parsing making that difficult? (My KDL parser doesn't have a separate tokenizer, but CSS's syntax, which I wrote the spec for, does have a tokenizer/parser distinction like this.) |
Beta Was this translation helpful? Give feedback.
-
Disallowing spaces in certain places inhibits tokenisation. Of course a parser that doesn't tokenise the input beforehand doesn't suffer from this, however my parser does and it's much easier to ignore most spaces.
The following examples are rejected by the specified grammar:
(type )node
( type)node
(type) node
I think it should be fine to accept these cases, as it doesn't create confusion and makes it easier to write parsers
Beta Was this translation helpful? Give feedback.
All reactions