tc39 / proposal-extended-numeric-literals

Extensible numeric literals for JavaScript
https://tc39.github.io/proposal-extended-numeric-literals/
72 stars 18 forks source link

IdentifierPart is not the grammar you're looking for #9

Closed rwaldron closed 4 years ago

rwaldron commented 6 years ago

This is IdentifierPart:

IdentifierPart ::     UnicodeIDContinue     $     _     \ UnicodeEscapeSequence     \     \

I believe you want Identifier or IdentifierName, depending on whether you want to restrict ReservedWord.

littledan commented 6 years ago

Oops, what I really want here is IdentifierPart+, since _ forms the initial character of the identifier. This needs a grammar change.

rwaldron commented 6 years ago

What is "IdentifierPart+"?

littledan commented 6 years ago

I meant the RegExp meaning of +: one or more IdentifierPart characters; sorry just being sloppy. The key thing is that the first thing after the doesn't have to be an IdentifierStart, it can be any IdentifierPart, since is part of the identifier.

littledan commented 4 years ago

The spec is removed and this text is gone, so closing.