Skip to content

Parsing prefixed radix numbers #244

Answered by zesterer
mainrs asked this question in Q&A
Discussion options

You must be logged in to vote

You can currently do this with the then_with combinator, but it's something that's likely going to be removed in a future version of the crate in favour of some other mechanism for customising the behaviour of future parsers based on the output of previous ones.

Alternatively, you can just parse add of the #nnRdddd with all possible digits and use try_map to do whatever manual consistency checks you want inline.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mainrs
Comment options

Answer selected by mainrs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants