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

Fix references in fragment rules #1762

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msujew
Copy link
Member

@msujew msujew commented Nov 28, 2024

This is a fix for an issue exposed in #1638.

Essentially, this is caused by the combination of cross references, actions and fragment rule calls. The main culprit is that we temporarily create AST nodes for fragment rule calls (which wasn't really necessary in the first place) and then use those temporary elements for the Reference object. As these AST nodes never get into the final AST, they don't have a document reference and result in errors during the scoping phase.

This change simply removes the temporary AST element, and lets the parser assign the properties to the original AST node that called the fragment rule.

Testing this fix requires a more complicated testing setup, but hopefully the comment explains this well enough.

@msujew msujew added bug Something isn't working parser Parser related issue labels Nov 28, 2024
@msujew msujew force-pushed the msujew/fix-fragment-references branch from 053e916 to 18662c3 Compare December 2, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser Parser related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant