kdl-org / kdl

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

tests: add more coverage for keywords #189

Closed benjreinhart closed 2 years ago

benjreinhart commented 2 years ago

Hey all,

I noticed that bare identifiers with a prefix that matches a keyword seem to confuse both the JS and Rust implementations into failing to parse. I don't think that's the desired behavior, so I added the following test cases that would be failing for those implementations.

Happy to change the tests around if folks have opinions or remove/merge some if you think any are redundant.

For example, the following two lines each fail:

null_id
node null_id=1

But these pass:

nnull_id
node nnull_id=1