Skip to content

Use a slice to accumulate errors - #20

Merged
nickng merged 1 commit into
mainfrom
lexer-error-slice
Aug 18, 2022
Merged

Use a slice to accumulate errors#20
nickng merged 1 commit into
mainfrom
lexer-error-slice

Conversation

@nickng

@nickng nickng commented Aug 18, 2022

Copy link
Copy Markdown
Owner

Instead of using a buffered channel to return errors, use two slices
to accumulate all errors, and return other errors before yacc-errors.

Thanks @its-luca for point this out: #19 (comment)

Instead of using a buffered channel to return errors, use two slices
to accumulate all errors, and return other errors before yacc-errors.
Comment thread bibtex.y
case err := <-l.ParseErrors:
return nil, err
switch {
case len(l.Errors) > 0: // Non-yacc errors

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should now be more deterministic as this case is checked first (specs)

@nickng
nickng merged commit 443fee2 into main Aug 18, 2022
@nickng
nickng deleted the lexer-error-slice branch August 18, 2022 23:37
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.

1 participant