-
Notifications
You must be signed in to change notification settings - Fork 171
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
underscore in numbers #660
Comments
@rezam90 yep I think this is a good idea, thanks! |
@shes50103 are you willing to try this? |
@SD10 good point, I think this can be done either in lexer or parser, not sure in which one will be simpler though |
Yeah, I was thinking of a lazy solution though. I think it would be better to store the original value of the token and do this work in both the Lexer and the Parser. You were right Here is where someone would need to turn goby/compiler/parser/data_type_parsing.go Line 12 in c00ad0c
|
@SD10 it seems that you're quite familiar with the components related to this feature, want to give it a try? |
If no one else claims it then sure 1.2e-3 # Float
0xaabb # (Hexadecimal) Fixnum
0b001001 # (Binary) Fixnum
0377 # (Octal) Fixnum |
I think we need to support all of them, but not right now |
ok, I can do it! |
ruby had this nice feature to add underscore between digits for numbers
1_000_000_000
it would be great if goby can do it too.
The text was updated successfully, but these errors were encountered: