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

Add .Nil member to SymbolUntypedValue.type for nil #377

Closed
wants to merge 1 commit into from

Conversation

thetarnav
Copy link
Contributor

@thetarnav thetarnav commented May 4, 2024

Change symbol for nil from SymbolBasicValue to SymbolUntypedValue

Enable semantic tokens for identifiers with SymbolBasicValue symbol value. Previously I disabled it (in #263) because nil was included there, which made it be highlighted as a type.

.Nil variant is not entirely correct, because nil cannot function as a value with "untyped type".
It needs a concrete type.
So doing it properly would probably mean getting the type from the context.
Not sure.

Maybe instead of adding .Nil variant, nil shouldn't get any symbol? Since any declaration needs an explicit type, the symbol for the identifier will get it's type, from the type, not value. (Did that in #378)

Change symbol for `nil` from SymbolBasicValue to SymbolUntypedValue

Enable semantic tokens for identifiers with SymbolBasicValue symbol value.
Previously I disabled it (in DanielGavin#263) because `nil` was included there,
which made it be highlighted as a type.
@thetarnav thetarnav force-pushed the semantic-tokens-nil branch from 044477b to 7fd830b Compare May 5, 2024 21:41
@thetarnav thetarnav closed this May 6, 2024
@thetarnav thetarnav deleted the semantic-tokens-nil branch May 8, 2024 13:38
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.

1 participant