Open JosephPecoraro opened 5 years ago
This is actually ES2021 feature instead of ES2019. See https://github.com/tc39/proposals/blob/master/finished-proposals.md
I've created a pull for this in my fork: https://github.com/node-projects/esprima-next/pull/12
Syntax:
New NumericLiteral syntax that allows for an
_
separator in numbers.Grammar changes are to NumericLiteral, allowing the
_
separator to show up in numbers.Spec:
TC39: https://github.com/tc39/proposal-numeric-separator https://tc39.es/proposal-numeric-separator/
ESTree: No node changes proposed, numeric
Literal
nodevalue
will just be the valueAdditional considerations
BigInt
(https://github.com/jquery/esprima/issues/1988)Remaining Tasks:
scanner.ts
changes for_
numeric separator)Test Cases
Valid:
Invalid: