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

Preserve name in DeclRefExpr for correct highlighitng of This. #4980

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

csyonghe
Copy link
Collaborator

@csyonghe csyonghe commented Sep 2, 2024

Closes #4981.

Fix a bug in language server that incorrectly highlights This type declref using the token length of the actual type name instead of just highlighting 4 characters.

The fix is to make sure the name field of constructed DeclRefExpr for the lookup result uses the name from the original VarExpr instead of the name from the referenced decl.

@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Sep 2, 2024
Copy link
Contributor

@kaizhangNV kaizhangNV left a comment

Choose a reason for hiding this comment

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

LGTM

@csyonghe csyonghe merged commit a7e9119 into shader-slang:master Sep 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syntax highlighting/hover info around This type is incorrect.
2 participants