Implement goto for enum literals - #71
Open
BlankTiger wants to merge 1 commit into
Open
Conversation
BlankTiger
force-pushed
the
enum_literal
branch
from
September 5, 2025 14:06
6d0db76 to
52b2f93
Compare
Owner
|
Thank you. I will try to review this PR soon. |
Owner
|
First of all, thank you for the PR! I am reviewing the changes now, and I think there is a lot of code that essentially performs type inference. Although this is necessary to resolve the type and provide the required functionality, I would like to introduce more general inference into the LSP so it is not specifically hardcoded in the goto logic for enum literals. I will try to refactor this PR into more general type inference functionality. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation handles following goto scenarios for enum literals:
SDL_CreateGPUDevice(.SPIRV | .MSL | .DXIL, ...)se: Some_Enum = .Aflags = .SPIRV | .MSLandident.parent.kind = .UNARY_OPERATIONvalue == .SOME_ENUMandvalue != .OTHER_ENUM