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: Add support for new float syntax #163

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

spotandjake
Copy link
Member

@spotandjake spotandjake commented Jun 26, 2023

I accidentally closed my other pr, when I deleted my fork, reopening from my new fork.

Closes: #154

@spotandjake spotandjake added the enhancement New feature or request label Jun 26, 2023
@spotandjake spotandjake self-assigned this Jun 26, 2023
@phated phated requested a review from ospencer February 22, 2024 06:25
@@ -838,6 +838,15 @@
}
}
},
{
"match": "\\b(0[xX][\\da-fA-F]+)(\\.[\\da-fA-F]*)?([p`P][+-]?\\d[\\d_]*)?([fdwW]?)\\b",
Copy link
Member

Choose a reason for hiding this comment

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

Why is there a backtick in [p`P]?

Copy link
Member

Choose a reason for hiding this comment

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

Also looks like underscores aren't accepted in the mantissa.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we accept it in our implementation.
image

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I meant that the underscores weren't accepted by your regex here. I'll add them.

@ospencer
Copy link
Member

ospencer commented Mar 4, 2024

image

@ospencer ospencer merged commit 44851bc into grain-lang:main Mar 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Syntax: Add Floating Point Hex Exponents to syntax highlighting
2 participants