-
Notifications
You must be signed in to change notification settings - Fork 144
Add support for number ranges #602
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
Open
Ztry8
wants to merge
44
commits into
ron-rs:master
Choose a base branch
from
Ztry8:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 16 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
da9168c
Add new error relating to ranges
Ztry8 362900a
Add basic deserialization for ranges
Ztry8 df87102
Add basic serialization for ranges
Ztry8 1892f20
Add support for inclusive ranges serialization
Ztry8 930f462
Make difference for inclusives in deserialization
Ztry8 da5b656
Add support for `core::range`
Ztry8 fc89a9a
Fix serialization for `core::range` support
Ztry8 b1e9404
Allow byte literals
Ztry8 d278210
Add test for integer bases, binary, octal, hex, and byte literals
Ztry8 7f41a78
Add unclosed ranges & new test for them
Ztry8 348d834
Add pretty config for ranges & new test for them
Ztry8 873c42f
Use pattern matching for field in `deserialize_struct`
Ztry8 481377c
`RangeMapAccess`: change magic numbers to enum
Ztry8 91de9b5
Move `NumberDeserializer` into `value` module
Ztry8 66c891f
Add additional name check in `deserialize_struct`
Ztry8 d423eef
Add ranges to `grammar.md` & `README.md`
Ztry8 51a1ad0
Fix punctuation
Ztry8 b2b6d41
Fix `docs/grammar.md`: restrict range bounds to numbers
Ztry8 1400780
Update `docs/grammar.md`: add number type
Ztry8 bb80be8
Add additional check for field name in ranges deserialization
Ztry8 8a62f7b
Remove visitor inspection (no longer needed)
Ztry8 3c04f28
Remove code duplication in deserialization
Ztry8 c5272a5
Add RangeFull & new tests for unclosed ranges
Ztry8 9beb51b
Guard against excess value reads in Range{From,To}MapAccess
Ztry8 4b2765e
Validate numeric bounds before emitting compact range syntax
Ztry8 30e425e
Split RangeTo and RangeToInclusive into separate deserialize branches
Ztry8 6e7a558
Fix formatting deserialization error
Ztry8 93fb3a1
Fix formatting deserialization error
Ztry8 a528961
Add check for structure name in range deserealization
Ztry8 c2be8f8
Refactor deserialization: add helper function
Ztry8 4788a8a
Add new tests for unclosed ranges of byte literals
Ztry8 9e94138
Handle inf/NaN as range bounds in deserialization
Ztry8 b7ea12d
Fix error formatting in range deserialization
Ztry8 270f27b
Improve untagged test
Ztry8 76c4422
Expand ranges description in `README.md`
Ztry8 fbb1068
Move helper function into `Parser` `impl` & remove old comment
Ztry8 bf844d0
Refactor deserialization: factor repeated code to common function
Ztry8 50175a6
Refactor deserialization: change condition
Ztry8 c6fada3
Refactor parsing & deserialization of NaN/inf float ranges
Ztry8 9b8f2b0
Replace bool flags with enum in serialization
Ztry8 b5c8e16
Replace `BTreeMap` with fields in ranges serialization
Ztry8 7e32f30
Use buffered fields in ranges serialization fallback
Ztry8 eee1757
Replace `String` with `Number` in range serialization
Ztry8 b7d06f1
Remove unused import
Ztry8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.