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

Number literals allow for multiple consecutive underscores #2

Open
Tracked by #8
liquidev opened this issue Aug 5, 2021 · 0 comments
Open
Tracked by #8

Number literals allow for multiple consecutive underscores #2

liquidev opened this issue Aug 5, 2021 · 0 comments
Labels
bug Something isn't working Lexer

Comments

@liquidev
Copy link
Member

liquidev commented Aug 5, 2021

This should not be allowed:

1____000

Additionally, this lack of restrictions around underscores creates an ambiguity when used with floating point exponents:

1_000_e+1

SemLiterals interprets this as if e+1 were a type suffix, which it obviously isn't.
Also, maybe there needs to be a better way of specifying the digit part and the suffix part, directly from the lexer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Lexer
Projects
None yet
Development

No branches or pull requests

1 participant