-
Notifications
You must be signed in to change notification settings - Fork 49
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
Extracting line / column numbers from a failed parse #54
Comments
So I've got the workings of a patch for this: https://github.com/statusfailed/trifecta/tree/failed-parse-locations It works OK (although I'm not sure if there are any bugs - I basically just changed some types and fixed errors until it compiled). here's an example of what output you get:
Unfortunately I've had to change the "Result" type, which breaks backwards compatibility. I'm not sure what the minimally-breaking way to write this would be - maybe add some @ekmett any thoughts? |
We need to change the Result and error types a bit anyways to support a Put that into a pull request, and I can merge it, forcing me to remember to deal with this when I fix |
Will do, but it's pretty messy! Let me know if you've any preferences for tidying before merging! |
Is it possible to get the position of an error from a failed parse? I see that "Result" is either
But it doesn't seem like I'd be able to extract the line number from the
Doc
The docs for
Err
also indicate that position isn't included, but not the reason why.Is there a way to get this information?
The text was updated successfully, but these errors were encountered: