Skip to content

Commit 27ca418

Browse files
committed
Add in many more digit separator flags.
This adds in the logic for new digit separator flags defining a number format, as well as enhances our documentation on the specification, however, it does not implement the parsing logic yet. Therefore, the unittests are expected to be broken now. [skip ci]
1 parent 3a5af1d commit 27ca418

File tree

6 files changed

+2532
-27
lines changed

6 files changed

+2532
-27
lines changed

CHANGELOG

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
- Support for `required_integer_digits_with_exponent`, `required_fraction_digits_with_exponent`, and `required_mantissa_digits_with_exponent`, that is,`1.e5` and `.1e5`, as opposed to just requiring`1e5` (#215).
2020
- Added `supports_parsing_integers`, `supports_parsing_floats`, `supports_writing_integers`, and `supports_writing_floats` for our number formats (#215).
2121
- Added `required_base_prefix` and `required_base_suffix` for our number formats, requiring base prefixes and/or suffixes when parsing, and allowing writing base prefixes and/or suffixes (#215).
22-
- Added `NumberFormatBuilder::none()` for create a format with no flags set.
22+
- Added `NumberFormatBuilder::none()` for create a format with no flags set (#215).
23+
- Added in many more digit separator flags for the `NumberFormat`, including for signs, base prefixes, base suffixes, and restricting digit separators at the start of the number (#215).
2324

2425
### Changed
2526

lexical-parse-integer/src/algorithm.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,7 @@ macro_rules! algorithm {
792792
);
793793
}
794794

795-
#[cfg(all(feature = "format", feature = "power-of-two"))]
796-
if format.required_base_suffix() && !has_suffix {
795+
if cfg!(all(feature = "format", feature = "power-of-two")) && format.required_base_suffix() && !has_suffix {
797796
return Err(Error::MissingBaseSuffix(iter.cursor()));
798797
}
799798

0 commit comments

Comments
 (0)