diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-01 07:51:20 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-01 07:55:49 -0400 |
| commit | a0dc065d1cdf27fee586b6fd1d2f2addcf928f8b (patch) | |
| tree | 69c614243845262ff88c802b75eb3a04a4d07b1b /src | |
| parent | 68a7b0228bd024c49564e1df98a55f8b61065417 (diff) | |
Improve resolving symbols on struct field container types
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/position_context.odin | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/server/position_context.odin b/src/server/position_context.odin index aad3d0e..d5e7d33 100644 --- a/src/server/position_context.odin +++ b/src/server/position_context.odin @@ -474,7 +474,7 @@ get_desired_expr :: proc(node: ^ast.Expr, position: common.AbsolutePosition) -> return n.key } if position_in_node(n.value, position) { - return n.key + return n.value } case ^ast.Dynamic_Array_Type: if position_in_node(n.tag, position) { @@ -487,6 +487,20 @@ get_desired_expr :: proc(node: ^ast.Expr, position: common.AbsolutePosition) -> if position_in_node(n.elem, position) { return n.elem } + case ^ast.Matrix_Type: + if position_in_node(n.elem, position) { + return n.elem + } + if position_in_node(n.row_count, position) { + return n.row_count + } + if position_in_node(n.column_count, position) { + return n.column_count + } + case ^ast.Bit_Field_Type: + if position_in_node(n.backing_type, position) { + return n.backing_type + } } return node |