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

Preserve non-base10 numeric literals #11

Merged
merged 3 commits into from
Oct 21, 2021
Merged

Conversation

imme64
Copy link
Collaborator

@imme64 imme64 commented Oct 21, 2021

  • Preserve numerical literals if they start with 0 (like 0x..., 0b..., 0o...)
  • Update dependency rocambole to latest version (0.7.0) and remove esprima which is transitively included by rocambole. Update was necessary because old esprima version was not able to handle octal and binary numeric literals.

Fixes #9

Copy link
Owner

@sstur sstur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just a couple suggestions.

test/transforms.txt Show resolved Hide resolved
tools/codegen.js Outdated Show resolved Hide resolved
tools/codegen.js Outdated Show resolved Hide resolved
…, 0o..)

- Update dependency rocambole to latest version (0.7.0) and remove esprima which is transitively included by rocambole. Update was necessary because old esprima version was not able to handle octal and binary numeric literals.
@sstur sstur changed the title - Preserve numerical literals if they start with 0 (like 0x..., 0b...… Preserve non-base10 numeric literals Oct 21, 2021
@sstur sstur merged commit d7ea673 into sstur:master Oct 21, 2021
@imme64 imme64 deleted the numeric_literals branch October 22, 2021 07:36
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

Successfully merging this pull request may close these issues.

hexadecimal integer gets converted to floating point decimal
2 participants