-
Notifications
You must be signed in to change notification settings - Fork 12
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
parser: add context information for unknown tags #167
Conversation
44849ce
to
4e4a5fe
Compare
Please view the diff ignoring whitespaces changes, or it's entirely unreadable. |
move |i: &'a str| { | ||
let result = inner(i); | ||
if let Err(nom::Err::Failure(err) | nom::Err::Error(err)) = &result { | ||
if err.message.is_none() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't wait for the if let chain
feature to be stable...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I would like to remove a lot of let Some(_) = f() else { return; }
*5 instances, too.
This is super cool, thanks! I'll need to re-approve once merge conflicts are fixed I think. ^^' |
4e4a5fe
to
1948d63
Compare
Thank you! :) Yes, oftentimes I was baffled myself why something does not parse correctly, so I hope this PR makes it clearer what is actually going on.
Indeed :) |
Thanks again! |
No description provided.