tsuki-lang / tsuki

An elegant, robust, and efficient programming language, that just lets you get things done.
MIT License
29 stars 2 forks source link

Number literals allow for multiple consecutive underscores #2

Open liquidev opened 3 years ago

liquidev commented 3 years ago

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?