Currently, Identifier has two attributes related to the \i/\I prefix:
the initializer parameter enforcePrefix, and
the computed attribute usePrefix => enforcePrefix || caseMismatch || name in keywords.
These are partially redundant, and it’s impossible to recover the enforcePrefix parameter if the name require the prefix anyways (as I found out when I investigated the RedHat AST conversion).
Instead, I believe the following would be better:
an initializer parameter usePrefix,
an assertion in the initializer, checking that usePrefix || !prefixRequired
toplevel helpers lidentifier and uidentifier that usePrefix iff required.
Currently,
Identifier
has two attributes related to the\i
/\I
prefix:enforcePrefix
, andusePrefix => enforcePrefix || caseMismatch || name in keywords
.These are partially redundant, and it’s impossible to recover the
enforcePrefix
parameter if the name require the prefix anyways (as I found out when I investigated the RedHat AST conversion).Instead, I believe the following would be better:
usePrefix
,usePrefix || !prefixRequired
lidentifier
anduidentifier
thatusePrefix
iff required.