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

Validation for multiple assignments takes rewrite actions into account now #1766

Merged
merged 7 commits into from
Dec 11, 2024

Conversation

JohannesMeierSE
Copy link
Contributor

Fixes #1756.

This PR contributes the following improvements for the validation for multiple assignments with = instead of += (see #1412):

  • unassigned actions don't create new objects, only rewrite actions create new objects
  • respect looped rewrite actions, even when they are deeply nested or occur as top-level elements of rules
  • handle asymmetric use of rewrite actions in alternatives

Beyond that, this PR ...

  • simplified the validation logic
  • improved error logging in test utils

@cdietrich
Copy link
Contributor

checked with my usecase in the arithmetics grammar + in the extension host and it seems to work

Copy link
Contributor

@sailingKieler sailingKieler left a comment

Choose a reason for hiding this comment

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

LVGTM! Just a few remarks and questions, nothing to be changed urgently. 🚀

@sailingKieler
Copy link
Contributor

And explicit kudos for your elaborate test cases!

@JohannesMeierSE
Copy link
Contributor Author

Thanks for your review @sailingKieler! In my eyes, this PR is ready to merge.

@JohannesMeierSE JohannesMeierSE merged commit e004619 into main Dec 11, 2024
5 checks passed
@spoenemann spoenemann deleted the jm/1756-validation-fix-multiple-rewrites branch December 18, 2024 07:33
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.

False positive in grammar multiple assignments validation
3 participants