Skip to content

fix member expression completions #1758

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

Merged
merged 5 commits into from
Jul 14, 2023

Conversation

zardoy
Copy link
Contributor

@zardoy zardoy commented Jul 13, 2023

e.g. arr.len|, seems it was broken for years

fixes microsoft/vscode#168021

@zardoy
Copy link
Contributor Author

zardoy commented Jul 13, 2023

though there is still no completions for ["|"] (would be useful for number props)

Copy link
Member

@connor4312 connor4312 left a comment

Choose a reason for hiding this comment

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

Took me a lil to grok but it looks okay. I think the main thing is just using estraverse's parent since the current implementation could incorrectly pass the parent as the previous sibling node.

@zardoy
Copy link
Contributor Author

zardoy commented Jul 14, 2023

I think the main thing is just using estraverse's parent since the current implementation could incorrectly pass the parent as the previous sibling node.

But it is inside of the asAcorn.start < offset && offset <= asAcorn.end check. Anyway, it was easy to change. Btw thank you for the quick reply!

@connor4312 connor4312 added this to the July 2023 milestone Jul 14, 2023
@connor4312 connor4312 enabled auto-merge (squash) July 14, 2023 15:41
@connor4312 connor4312 merged commit 16b9a70 into microsoft:main Jul 14, 2023
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.

Inconsistent completions in debugger
3 participants