kdl-org / kdl

the kdl document language specifications
https://kdl.dev
Other
1.1k stars 61 forks source link

Allow "empty" single line comments in the spec #234

Closed basile-henry closed 2 years ago

basile-henry commented 2 years ago

As I read the grammar in the spec, "//" wouldn't parse as a single-line-comment as it requires as least one non-newline character after the slashes.

zkat commented 2 years ago

oof. Good catch. I'm moving this to the v2 branch, though, because it's a breaking change, and I wanna let others chime in in case anything else like this comes to mind.

CAD97 commented 2 years ago

If it wouldn't parse successfully otherwise, it's not breaking, as it's solely extending the allowed grammar. I don't believe there's any case where // is valid currently, where it would potentially be a comment after this.