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

2^64 -1 cannot be represented #15

Closed
jrakow opened this issue Jul 13, 2018 · 5 comments
Closed

2^64 -1 cannot be represented #15

jrakow opened this issue Jul 13, 2018 · 5 comments

Comments

@jrakow
Copy link

jrakow commented Jul 13, 2018

The highest u64 value (18446744073709551615) cannot be represented with the current Token::IntegerLiteral(i64).

One would probably need SignedIntegerLiteral(i64) as well as UnsignedIntegerLiteral(u64).
Or you could use on of the 128 bit types.

@sgodwincs
Copy link
Owner

Do you have any preference to the two fixes?

@jrakow
Copy link
Author

jrakow commented Jul 14, 2018

I think the two variant version matches the grammar most closely.
It is also extensible, should WebIDL ever allow 128 bit tokens.

@sgodwincs
Copy link
Owner

@jrakow Can you confirm the fix is what you want before I push a new version?

@jrakow
Copy link
Author

jrakow commented Jul 14, 2018

This uses u64 as fallback and all the values in the spec can be represented now.
So yeah, looks good to me.

@sgodwincs
Copy link
Owner

Version 0.7.0 should have the fix. Thanks for the report.

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

No branches or pull requests

2 participants