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 CST nodes pointing to stale AST nodes when parsed from subrules #932

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

daumantas-kavolis-sensmetry
Copy link
Contributor

This fixes CST node element pointing to stale AST nodes when parsed from a subrule. This is important for CST based services such as a formatter which can fail because keywords or properties are incorrectly assumed to be owned by another AST node. Also tested on https://gitlab.com/sensmetry/public/sysml-2ls/-/tree/feat/formatting to make sure it didn't break anything else.

Opening this as draft for now since I could not find a generic way to apply this to any subrule nesting level as shown by the added failing test. I will mark it ready if the test case should be removed and addressed in a separate PR or there is a fix for it.

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.

None yet

1 participant