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

Errors may occur at the first token of a line #1549

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

Rangi42
Copy link
Contributor

@Rangi42 Rangi42 commented Oct 22, 2024

This isn't the first time we've had pre-existing test cases which should have made us aware of a bug if we'd really thought about their output. :P

@Rangi42 Rangi42 added bug Unexpected behavior / crashes; to be fixed ASAP! rgbasm This affects RGBASM labels Oct 22, 2024
@Rangi42 Rangi42 added this to the v0.9.0 milestone Oct 22, 2024
@Rangi42 Rangi42 requested a review from ISSOtm October 22, 2024 18:44
Copy link
Member

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

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

The reason why this works is a little unintuitive, but the behaviour is correct. (If a syntax error occurs before the parser “enters” the line production, then that one's error recovery is not seen! So instead, reducing the syntax error as a lines lets us proceed with reducing more lines.)

Thank you for this investigation, @Rangi42!

(Side note: this might have been correct before we introduced diff_mark. I'm not too sure. But I'm not really concerned either.)

@ISSOtm ISSOtm merged commit 7fcf4ba into gbdev:master Oct 22, 2024
22 checks passed
@Rangi42 Rangi42 deleted the error-lines branch October 22, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior / crashes; to be fixed ASAP! rgbasm This affects RGBASM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants