-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigInt should be allowed to use as object key #136
Comments
What's your node/browser version?
|
node v15 works. |
It's a valid case. BigInt can be a property key. Also for Class |
I see where is missed. } else if ((parser.token & Token.IsStringOrNumber) === Token.IsStringOrNumber) {
key = parseLiteral(parser, context); Our Token.IsStringOrNumber only applies to string and number, not bigint. ecma spec seems indicating bigint can be used anywhere a normal number fits.
|
Yes. It's easy to update token.ts |
also need to update parseLiteral to check bigint. |
why? How do you parse BigInt now? Just check for "if (token === Token.BigInt") return parseBigInt) |
yes, I am adding the line to parseLiteral, if you add the line outside of parseLiteral, you need to add it in many places after Token.IsStringOrNumber check. |
The text was updated successfully, but these errors were encountered: