Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nickng
Copy link
Owner

@nickng nickng commented Aug 18, 2022

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.
case err := <-l.ParseErrors:
return nil, err
switch {
case len(l.Errors) > 0: // Non-yacc errors
Copy link
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.

2 participants