Closed brabalan closed 6 years ago
Turns out that we already did special-case arguments
, eval
, and caller
keywords, we just hadn't bothered completing the rest of the list.
Currently these are unsupported as identifiers in the ocaml source code. I propose to permit them, but to prefix the variable name with a $
character. We already use $
in place of '
, and ocaml does not permit '
as the first character of an identifier, so we should be safe to use it as a prefix.
We may also use any Unicode character that has the ID_Continue property that is not in the ocaml identifier range ([a-zA-Z0-9] and ISO8859-1 characters 192–214, 216–246, 248–255).
Fixed in 68fef4b.
If anyone has any preference for a symbol to prefix these identifiers other than 𝕍
, feel free to suggest one/update the code.
The generator should not accept variable names that are reserved JavaScript words.