Closed zkat closed 7 months ago
While I generally don't like how it looks, whitespace is allowed around the =
in HTML/XML too, so I support this.
In intellij-kdl I had to add support for this to have better error reporting. See parser
This would be more than one step of lookahead right? identifier ws* escline* ws*
could still be a value instead of a prop. Also, should more than one escline be allowed? I don't see why you would need more but I feel the same about the whitespace in the first place, and in comparison it feels like a just as arbitrary restriction. Also, I think this disallows whitespace at the start of a line with a second or subsequent escline.
Closing in favor of https://github.com/kdl-org/kdl/issues/355
The current definition for props is like this:
prop := identifier '=' value
, which does not allow spaces.Instead, I propose the following definition:
prop := identifier ws* escline* ws* '=' ws* escline* ws* value
, which will require parsers to have one step of lookahead, but that's pretty normal and totally fine and common to do.