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

Allow hexadecimal numeric constants #2735

Closed
lukaszcz opened this issue Apr 18, 2024 · 0 comments · Fixed by #2746
Closed

Allow hexadecimal numeric constants #2735

lukaszcz opened this issue Apr 18, 2024 · 0 comments · Fixed by #2746
Assignees
Labels
enhancement New feature or request parsing
Milestone

Comments

@lukaszcz
Copy link
Collaborator

Allow to write e.g.

BETA : Field := 0x6f21413efbe40de150e596d72f7a8c5609ad26c15c915c1f4cdfcb99cee9e89;

Now one needs to convert all hexadecimal constants (e.g. used with Cairo) into decimal.

@lukaszcz lukaszcz added enhancement New feature or request parsing labels Apr 18, 2024
@lukaszcz lukaszcz added this to the 0.6.2 milestone Apr 18, 2024
@janmasrovira janmasrovira self-assigned this Apr 19, 2024
@janmasrovira janmasrovira linked a pull request Apr 19, 2024 that will close this issue
janmasrovira added a commit that referenced this issue Apr 22, 2024
- Closes #2735 

Allow integer literals to be expressed in different bases:
1. binary, with prefix `0b`.
2. octal, with prefix `0o`.
3. decimal, with no prefix.
4. hexadecimal, with prefix `0x`. Both capital and lower case letters
are parsed. They are always printed as lower case letters.

This applies to all languages that use integer literals, but only in the
concrete language the base will be preserved when pretty printing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parsing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants