Skip to content
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

Should bigint string representation be normalized? #200

Open
pvdz opened this issue Sep 25, 2019 · 2 comments
Open

Should bigint string representation be normalized? #200

pvdz opened this issue Sep 25, 2019 · 2 comments

Comments

@pvdz
Copy link

pvdz commented Sep 25, 2019

The spec in https://github.com/estree/estree/blob/master/es2020.md states

bigint property is the string representation of the BigInt value. It doesn't include the suffix n.

Should this represent the source text or a normalized notation?

In other words; is the AST for 1048575n equivalent to that of 0xfffffn or not due to the .bigint field?

@pvdz
Copy link
Author

pvdz commented Sep 25, 2019

While the AST is not a CST, it would probably be easier on many fronts to use the source text rather than normalizing the value to decimal. So that would have my preference.

My two cents.

@michaelficarra
Copy link
Member

We should specify that it is a base-10 string representation of the bigint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants