Skip to content
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

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

Kijewski
Copy link
Collaborator

No description provided.

@Kijewski
Copy link
Collaborator Author

Kijewski commented Sep 10, 2024

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() {
Copy link
Contributor

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...

Copy link
Collaborator Author

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.

GuillaumeGomez
GuillaumeGomez previously approved these changes Sep 10, 2024
@GuillaumeGomez
Copy link
Contributor

This is super cool, thanks! I'll need to re-approve once merge conflicts are fixed I think. ^^'

@Kijewski
Copy link
Collaborator Author

This is super cool, thanks!

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.

I'll need to re-approve once merge conflicts are fixed I think. ^^'

Indeed :)

@GuillaumeGomez
Copy link
Contributor

Thanks again!

@GuillaumeGomez GuillaumeGomez merged commit 8c05b87 into rinja-rs:master Sep 10, 2024
34 checks passed
@Kijewski Kijewski deleted the pr-no-such-tag branch September 11, 2024 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants