Nothing Special   »   [go: up one dir, main page]

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

feat: allow multiple errors to be reported #45

Closed
wants to merge 1 commit into from

Conversation

claby2
Copy link
Member
@claby2 claby2 commented Apr 3, 2021

This PR implements the ability for multiple errors to be reported. Resolves #17.

Implementation Details

When an error is encountered when iterating through Parser<I>, a while loop is used to continue iterating through the tokens until an entry that isn't an error is found. This is explained in the comments as part of the initial commit:

// If an error has been encountered, continue iterating until a non-error entry is found.
// Contiguous errors are a by-product of the initial error and shouldn't be reported.

A unit test has been added to test and demonstrate this functionality.

Note: No functionality to format parse errors has been implemented in this PR; however, this will be done if needed (perhaps in this PR?).

@claby2 claby2 requested a review from virchau13 April 3, 2021 12:57
@virchau13
Copy link
Member

Unfortunately, this has multiple false positives. It is better to allow multiple errors to be reported through the use of other methods.

@virchau13 virchau13 closed this Apr 6, 2021
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.

Add ability to report multiple errors
2 participants