Skip to content

Commit

Permalink
Remove writing semantic nodes for untyped and basic value symbols
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thetarnav committed Oct 26, 2023
1 parent 20b0dc9 commit a6e7fa7
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions src/server/semantic_tokens.odin
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a6e7fa7

Please sign in to comment.