Import tomltestgen

Handful are failing.
This commit is contained in:
Thomas Pelletier
2021-03-26 09:51:35 -04:00
parent 390927a0cd
commit 636a75f316
5 changed files with 1072 additions and 0 deletions
+6
View File
@@ -200,6 +200,12 @@ func parseFloat(b []byte) (float64, error) {
return 0, err
}
cleanedVal := cleanupNumberToken(tok)
if cleanedVal[0] == '.' {
return 0, fmt.Errorf("float cannot start with a dot")
}
if cleanedVal[len(cleanedVal)-1] == '.' {
return 0, fmt.Errorf("float cannot end with a dot")
}
return strconv.ParseFloat(cleanedVal, 64)
}