From d4c772907d72604a9601075bdb082e474edf45bc Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 15 May 2025 15:32:38 -0500 Subject: [PATCH] scripts: csv.py: Fixed completely broken float parsing Whoops! A missing splat repetition here meant we only ever accepted floats with a single digit of precision and no e/E exponents. Humorously this went unnoticed because our scripts were only _outputting_ single digit floats, but now that that's fixed, float parsing also needs a fix. Fixed by allowing >1 digit of precision in our CsvFloat regex. --- scripts/csv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/csv.py b/scripts/csv.py index bfe5116b..ad756840 100755 --- a/scripts/csv.py +++ b/scripts/csv.py @@ -1129,7 +1129,7 @@ class CsvExpr: p.chomp() # floats - elif p.match('[+-]?(?:[_0-9]*\.[_0-9eE]|nan)'): + elif p.match('[+-]?(?:[_0-9]*\.[_0-9eE]*|nan)'): a = CsvExpr.FloatLit(CsvFloat(p.chomp())) # ints