aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/analysis.odin14
-rw-r--r--src/server/semantic_tokens.odin7
2 files changed, 10 insertions, 11 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index 2f1035d..a75b574 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -1308,27 +1308,25 @@ internal_resolve_type_identifier :: proc(
ident := new_type(Ident, node.pos, node.end, ast_context.allocator)
ident.name = node.name
- symbol: Symbol
-
switch ident.name {
+ case "nil":
+ return {}, false
case "true", "false":
- symbol = Symbol {
+ return {
type = .Keyword,
signature = node.name,
pkg = ast_context.current_package,
value = SymbolUntypedValue{type = .Bool},
- }
+ }, true
case:
- symbol = Symbol {
+ return {
type = .Keyword,
signature = node.name,
name = ident.name,
pkg = ast_context.current_package,
value = SymbolBasicValue{ident = ident},
- }
+ }, true
}
-
- return symbol, true
}
if local, ok := get_local(ast_context, node.pos.offset, node.name);
diff --git a/src/server/semantic_tokens.odin b/src/server/semantic_tokens.odin
index ce7476f..5d55138 100644
--- a/src/server/semantic_tokens.odin
+++ b/src/server/semantic_tokens.odin
@@ -596,10 +596,11 @@ visit_ident :: proc(
SymbolFixedArrayValue,
SymbolSliceValue,
SymbolMapValue,
- SymbolMultiPointer:
+ SymbolMultiPointer,
+ SymbolBasicValue:
write_semantic_node(builder, ident, .Type, modifiers)
- case SymbolBasicValue, SymbolUntypedValue:
- // handled by static syntax analysis
+ case SymbolUntypedValue:
+ // handled by static syntax highlighting
case SymbolGenericValue:
// unused
case: