Skip to content

Commit

Permalink
Fix semantic highlighting of MyEnum.value
Browse files Browse the repository at this point in the history
  • Loading branch information
FnControlOption committed Jul 10, 2023
1 parent 8179303 commit a484e78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Server.zig
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ pub fn getSymbolFieldAccesses(
try decls_with_handles.append(server.arena.allocator(), (try server.analyser.lookupSymbolContainer(
.{ .node = container_handle_node, .handle = ty.handle },
name,
true,
!ty.isEnumType(),
)) orelse continue);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/features/semantic_tokens.zig
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ fn writeNodeTokens(builder: *Builder, node: Ast.Node.Index) error{OutOfMemory}!v
.ast_node => |decl_node| {
if (decl_type.handle.tree.nodes.items(.tag)[decl_node].isContainerField()) {
const tok_type: ?TokenType = if (ast.isContainer(lhs_type.handle.tree, left_type_node))
fieldTokenType(decl_node, lhs_type.handle)
fieldTokenType(left_type_node, lhs_type.handle)
else if (left_type_node == 0)
.property
else
Expand Down

0 comments on commit a484e78

Please sign in to comment.