mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-10-28 18:07:16 +08:00
The JSON format rejects leading zeros, which JavaScript also rejects, but it further requires digits on both sides of the decimal point, which JavaScript does not: ".5", "5." and "5.e3" are all valid DecimalLiteral productions. Users lexing JavaScript therefore could not use chars_format::json and had to re-check the integer span themselves after a general-mode parse. chars_format::javascript is general mode plus the leading-zero rule (reported as leading_zeros_in_integer_part), with no_infnan. It is a runtime check on the format, like fortran, so it reuses the existing parse_number_string<false> instantiation. A leading minus sign is accepted, and a leading plus sign with allow_leading_plus. Claude-Session: https://claude.ai/code/session_01KbAWRBpE3MPy5cXECc5vWZ |
||
|---|---|---|
| .. | ||
| bloat_analysis | ||
| build_tests | ||
| installation_tests | ||
| basictest.cpp | ||
| BUILD.bazel | ||
| CMakeLists.txt | ||
| example_comma_test.cpp | ||
| example_integer_times_pow10.cpp | ||
| example_test.cpp | ||
| exhaustive32_64.cpp | ||
| exhaustive32_midpoint.cpp | ||
| exhaustive32.cpp | ||
| fast_int.cpp | ||
| fixedwidthtest.cpp | ||
| fortran.cpp | ||
| ipv4_test.cpp | ||
| javascript_fmt.cpp | ||
| json_fmt.cpp | ||
| long_exhaustive32_64.cpp | ||
| long_exhaustive32.cpp | ||
| long_random64.cpp | ||
| long_test.cpp | ||
| p2497.cpp | ||
| powersoffive_hardround.cpp | ||
| random64.cpp | ||
| random_string.cpp | ||
| rcppfastfloat_test.cpp | ||
| short_random_string.cpp | ||
| string_test.cpp | ||
| supported_chars_test.cpp | ||
| wide_char_test.cpp | ||