Refactor lexing of fixed-point numbers (#1915)

This incidentally fixes a bug with too-long fixed-point literals
that have precision suffixes.
This commit is contained in:
Rangi
2026-04-06 21:45:34 -04:00
committed by GitHub
parent ede9405daf
commit 11f6278d95
5 changed files with 116 additions and 97 deletions
+6 -2
View File
@@ -8,8 +8,12 @@ println 1.q2
; bad
println 12.34q0
println 12.34q_15
println 12.34q1_5
println 12.34q_15 ; lexes as `12.34q` (invalid) then symbol `_15`
println 12.34q1_5 ; lexes as `12.34q1` (valid) then symbol `_5`
println 1_.2
println 1._2
println 1.__2
println 1.2q
println 1.999_999_999_999_999
println 1.999_999_999_999_999q16
println 1.999_999_999_999_999q.16