8000 Inconsistent treatment of keywords in zz.pest · Issue #66 · zetzit/zz · GitHub
[go: up one dir, main page]

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

Inconsistent treatment of keywords in zz.pest #66

Open

Description

@johnwcowan

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0