-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional format versions and enhancements. #215
base: main
Are you sure you want to change the base?
Conversation
63f9adf
to
fdef013
Compare
This PR also adds a fairly major overhaul for the format API in general, by adding better support for base prefixes and suffixes in a much more comprehensive manner, and also improves a lot of our existing formats and adds newer version compatibility for those formats. |
dae4139
to
27ca418
Compare
This is turning out to be a massive PR but is currently mostly complete for the enhancements for a much more complete formatting API, better testing, and better examples/pre-built formats. |
f273f28
to
91074ea
Compare
This PR is making significant progress: a few patches need to be made but all the core schema and logic for testing languages and language versions is in the float format repo. |
This patches support for Rust literals as well as other formats.
This adds the following number format flags: - `supports_parsing_integers` - `supports_parsing_floats` - `supports_writing_integers` - `supports_writing_floats` If an operation is not supported with the format feature, then the code panics or returns an error immediately, which will always be resolved at compile time.
This requires them when parsing but also adds them to our float and integer writers when writing formats. This is useful for cases like hex floats where the floats only make sense when they have a literal `0x` prefixing them.
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]
This adds support for the integer and exponent digit separator flag parsing.
This keeps our digit counts separate for each component rather than keep them as one of a larger memo, since we can handle eac individual digit separator component correctly like this, and it simplifies and improves performance when one component doesn't allow digit separators.
It's causing massive variability with code changes, without any changes for benches when run independently.
This improves both the parsing of sign and digits for better performance, especially with non-decimal radices and larger digit counts.
This adds comprehensive tests, including correctness ones, as well as performance benchmarks to ensure optimal ASM is generated on x86_64, including re-arranging some code to optimize jumps.
…rs but not without if disabled.
This is a waste of flag space and should be removed prior to any releases.
This enables toggling no unsigned integer negative signs, and having no signs (even negative) for mantissas and exponents. This commit is broken and will not work for the new additions in parsing.
36599c3
to
a023bef
Compare
This adds newer standard versions for C, C++, C#, and additional programming languages. This also adds support for requiring integer or fraction digits with exponents. This patches support for Rust literals as well as other formats.