Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Parser Panicing when Emitting a Syntax Error Message with No Expected Tokens #677

Conversation

InsertCreativityHere
Copy link
Member

Each parser has a 'clean_message' function that's responsible for taking a LALRPOP error and making it readable before passing it off to the user, but these functions do not handle the case where the parser expected no tokens.

For example:

#else Hello

It's invalid for tokens to appear after else.

Copy link
Contributor

@ReeceHumphreys ReeceHumphreys left a comment

Choose a reason for hiding this comment

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

Looks good

@InsertCreativityHere InsertCreativityHere merged commit 6a8d3b2 into icerpc:main Nov 28, 2023
4 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants