This pull request improves how as const is parsed. Currently, an expression like "foobar" as const is parsed as if const were a type identifier, which is wrong, it is a keyword.
Checklist:
[X] All tests pass in CI.
[X] There are sufficient tests for the new fix/feature.
[X] Grammar rules have not been renamed unless absolutely necessary.
[X] The conflicts section hasn't grown too much.
[X] The parser size hasn't grown too much (check the value of STATE_COUNT in src/parser.c).
(STATE_COUNT increased from 4437 to 4439)
This pull request improves how
as const
is parsed. Currently, an expression like"foobar" as const
is parsed as ifconst
were a type identifier, which is wrong, it is a keyword.Checklist: