Skip to content
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

Ranges don't support floats #178

Open
rooooooooob opened this issue Apr 17, 2023 · 0 comments
Open

Ranges don't support floats #178

rooooooooob opened this issue Apr 17, 2023 · 0 comments
Labels
CDDL feature Feature that is required for proper parsing of CDDL files

Comments

@rooooooooob
Copy link
Collaborator

foo = 0.1 .. 0.5
bar = f64 .le 3.1415926535

low priority issue, just made to keep documentation on unsupported things and to link in the panic

@rooooooooob rooooooooob added the CDDL feature Feature that is required for proper parsing of CDDL files label Apr 17, 2023
rooooooooob added a commit that referenced this issue Apr 17, 2023
better coverage between top-level vs signed_ints member for various
ranges that map to primitives

fix for when >isize::MAX limits are used as we used `isize` when `i128`
would be better for covering all possibilities (`i64`, `u64`, `f64`)

float ranges now panic when they have a decimal part as we were silently
ignoring this. Issue created: #178
gostkin pushed a commit that referenced this issue Apr 19, 2023
* Direct ranges in fields e.g. `foo: 0..255`

Previously they were only supported at the top-level.
Incorrect parsing lead these to be treated as a constant of the lower
bound.

Fixes #172

* integer range test coverage + fix for >isize::MAX ranges

better coverage between top-level vs signed_ints member for various
ranges that map to primitives

fix for when >isize::MAX limits are used as we used `isize` when `i128`
would be better for covering all possibilities (`i64`, `u64`, `f64`)

float ranges now panic when they have a decimal part as we were silently
ignoring this. Issue created: #178

* run cargo fmt

* clippy fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDDL feature Feature that is required for proper parsing of CDDL files
Projects
None yet
Development

No branches or pull requests

1 participant