Skip to content

Is there a way to get how many bytes parsed after a successful one? #333

Answered by epage
inflation asked this question in Q&A
Discussion options

You must be logged in to vote

You should be able to do something like:

let start = input.checkpoint();
let output = parser.parse_next(input)?;
let len = input.offset_from(start);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by inflation
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