Use constants instead of hard-coded strings in Tools/cases_generator
#122449
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-feature
A feature request or enhancement
Feature or enhancement
Proposal:
I suggest improving the token kind checks
tkn.kind == "<hardcoded string>"
by using the corresponding lexer's constant string (which already exists). Some portion of the code already does it but not everywhere. We can also do the same for other kind of constructions where hard-coded strings could be replaced by constants, both for the semantics and for safety.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Tools/cases_generator
#122448The text was updated successfully, but these errors were encountered: