Skip to content

Recovery in completions #7410

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

Draft
wants to merge 4 commits into
base: analysis-simplification
Choose a base branch
from

Conversation

nojaf
Copy link
Collaborator

@nojaf nojaf commented Apr 29, 2025

Proof of concept to find a cursor inside broken code.
The idea is to have a second pass of the syntax tree after parsing.
There we can update certain location, which streamlines the frontend completion phase.

@@ -1,20 +1,15 @@
Found Completable: Cpattern
case _ vamp [4:2->6:1], has cursor true
Found Completable: Ccase
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the whole point of the snapshot testing setup.
We can visually see that we are hooking onto a better ast node and can use this for completions.

@zth zth force-pushed the analysis-simplification branch from b1518ea to b11f460 Compare April 30, 2025 08:29
@nojaf
Copy link
Collaborator Author

nojaf commented May 1, 2025

Currently using the patternhole as found node in frontend completion.
Next thing would be for that range to be present in the cmt file.

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