Skip to content

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

Closed
thetarnav wants to merge 1 commit intoDanielGavin:masterfrom
thetarnav:semantic-tokens-nil
Closed

Add .Nil member to SymbolUntypedValue.type for nil#377
thetarnav wants to merge 1 commit intoDanielGavin:masterfrom
thetarnav:semantic-tokens-nil

Conversation

@thetarnav
Copy link
Copy Markdown
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