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

Make LSP parser aware of variables in sub-blocks #47338

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

Razoric480
Copy link
Contributor

@Razoric480 Razoric480 commented Mar 24, 2021

Vnen has stated that he will fix ongoing issues with GDScript for 4.0, but given that is a ways away, he has noted that language server issues can still be fixed for 3.x.

Previously, the extended GDScript parser for the language server only looked at function blocks' surface without digging into sub blocks, like loops and if statements. That made hover requests fail, notably, though other look up tasks would also come up empty.

This PR makes it recursively get all of a function sub-blocks so that it can add their variables as part of the function's children.

Fixes #43164 and Fixes godotengine/godot-vscode-plugin#207

@Razoric480 Razoric480 requested a review from a team as a code owner March 24, 2021 20:53
@Calinou Calinou added this to the 3.4 milestone Mar 24, 2021
@akien-mga akien-mga modified the milestones: 3.4, 3.3 Mar 25, 2021
@akien-mga akien-mga merged commit 9008b34 into godotengine:3.x Mar 25, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants