-
Notifications
You must be signed in to change notification settings - Fork 2
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 underscores in number literals #20
Conversation
Codecov Report
@@ Coverage Diff @@
## main #20 +/- ##
==========================================
+ Coverage 76.76% 76.79% +0.03%
==========================================
Files 105 105
Lines 6076 6086 +10
==========================================
+ Hits 4664 4674 +10
Misses 1412 1412
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah thanks so much @wackbyte, I really wasn't expecting any contributions this soon ❤️
Interesting that you removed the underscores during the JavaScript codegen. My first thought was to remove them when converting from CST to AST - that way the removal can happen in one place rather than in all the code generators (there will eventually be more than one...). But then again, maybe it makes sense to handle it on a per-codegen basis?
Not a big deal at all, happy to merge this PR as it is, but would be keen to hear your thoughts!
5901ad5
to
b7b0596
Compare
Doing it during AST conversion does make more sense, actually. I think I tried to do it but wasn't able to find where it was in the code 😅 |
Ahh that's my bad. The conversion from CST to an intermediate/pre-AST happens here, then there's another conversion (as part of type-checking) that happens here. I'm happy to make the change if you want? Let me know 🙂 |
Allows basically the same things as Rust.
The underscores are removed during codegen.
Closes #7.