* Lex identifiers after `case` as constants Add a state for marking identifiers preceded by a `case` keyword as constants. Additionally, refactor the `label` rule to no longer permit a `case` keyword before a label. Consequentially, identifiers after a `case` keyword (like `foo` in `case foo:`) are no longer wrongly lexed as `Name.Label`, but as `Name.Constant`. In addition, this fixes #2076, as multiple `case` keywords in one line are lexed the same. * Add test for multiple `case` keywords in one line * Fix existing tests * Lex `::` as Operator and not Name.Constant After a `case`, when lexing a namespaced name, like `foo::bar`, lex the namespace operator `::` as Operator, and not Name.Constant. * Regenerate tokens |
||
---|---|---|
.. | ||
ceval.c | ||
ceval.c.output | ||
example.c | ||
example.c.output | ||
labels.c | ||
labels.c.output | ||
numbers.c | ||
numbers.c.output |