Identifiers were required to start with at most one optional underscore, followed by an alphabetic character (to avoid identifiers like _-'), and then by any identifier character. This means that identifiers like __foo were invalid.
There is no good reason for that, and this is mostly an oversight when writing the initial regular expression. This commit extends the lexer to allow zero or more heading underscores before the first alphabetic character.
This came up as I tried to pick ugly, mangled and hopefully non-clashing names for generated Nickel code.
Identifiers were required to start with at most one optional underscore, followed by an alphabetic character (to avoid identifiers like _-'), and then by any identifier character. This means that identifiers like
__foo
were invalid.There is no good reason for that, and this is mostly an oversight when writing the initial regular expression. This commit extends the lexer to allow zero or more heading underscores before the first alphabetic character.
This came up as I tried to pick ugly, mangled and hopefully non-clashing names for generated Nickel code.