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

feat(compiler): Add hex float syntax #1743

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

spotandjake
Copy link
Member

This adds the the following type of syntax to be supported for decimals in grain 0x1F.4p5 which is similar to the 1.1e1 syntax but its treated as hexadecimal instead of decimal.

Adds to the syntax to the lexer
Adds regression tests
Replaces places alternative syntax was used.

Documentation here for when looking over tests: https://en.cppreference.com/w/cpp/language/floating_literal

Closes: #1715

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Very cool! Can you add an issue to the GLS repo so we can add syntax highlighting?

@ospencer ospencer changed the title feat(compiler): Add Hex Exponent Decimals feat(compiler): Add hex float syntax Mar 11, 2023
@phated
Copy link
Member

phated commented Mar 14, 2023

Issue was opened at grain-lang/grain-language-server#154

@phated phated added this pull request to the merge queue Mar 14, 2023
Merged via the queue into grain-lang:main with commit 8a69eb3 Mar 14, 2023
av8ta pushed a commit to av8ta/grain that referenced this pull request Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

compiler: Add Support For Decimal Scientific Notation
3 participants