From a6e7fa758e19b7e42cec0d63840feae3854ddea7 Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Thu, 26 Oct 2023 17:50:44 +0200 Subject: [PATCH] Remove writing semantic nodes for untyped and basic value symbols The result semantic token types were often incorrect for constants and literals. Syntax grammars do a decent job here, but were being overridden by the semantic tokens. I'm not yet familiar enough with the codebase to fix this properly, instead of just removing it. --- src/server/semantic_tokens.odin | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/server/semantic_tokens.odin b/src/server/semantic_tokens.odin index e78cc4e2..e5cbbb13 100644 --- a/src/server/semantic_tokens.odin +++ b/src/server/semantic_tokens.odin @@ -1,9 +1,9 @@ package server -import "core:odin/tokenizer" -import "core:odin/ast" -import "core:log" import "core:fmt" +import "core:log" +import "core:odin/ast" +import "core:odin/tokenizer" import "shared:common" @@ -345,22 +345,6 @@ visit_node :: proc( .Function, modifier, ) - case SymbolUntypedValue: - write_semantic_node( - builder, - node, - ast_context.file.src, - .Type, - modifier, - ) - case SymbolBasicValue: - write_semantic_node( - builder, - node, - ast_context.file.src, - .Type, - modifier, - ) case SymbolMatrixValue: write_semantic_node( builder,