Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Inconsistent treatment of keywords in zz.pest #66

Open
johnwcowan opened this issue May 14, 2020 · 0 comments
Open

Inconsistent treatment of keywords in zz.pest #66

johnwcowan opened this issue May 14, 2020 · 0 comments
Labels
question Further information is requested

Comments

@johnwcowan
Copy link

I think that for clarity keywords should always have key_* rules and should be in the keyword rule. In particular (this list may not be correct or complete):

  • is, inline, where, model, for, while, switch, if, else, unsafe have key_* rules but don't use them;
  • struct, union, static, atomic, and thread_local have key_* rules but don't appear in the keyword rule;
  • true, false, as, export, extern, fn, fntype, symbol, theory, needs, using, test, macro don't have key_* rules at all.

The first group should be fixed just to improve readability, as it has no effect on the grammar accepted.

As for the second and third groups it may be that you don't want some of these keywords to be excluded from the identifiers, but I think context-sensitive keywords just make things more confusing. I recommend changing them all too, even though this will exclude some code that was formerly legal.

@jwerle jwerle added the question Further information is requested label Jul 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants