aboutsummaryrefslogtreecommitdiff
path: root/src/server/symbol.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-01 22:16:57 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-01 22:22:23 -0400
commit61d846a03f4a6991172aaaf63cd0aa19161c0739 (patch)
tree74297f0bb1106fc91e797aa8ba1b98d37e867f1f /src/server/symbol.odin
parent34b70ebbe5849bd4291711339fe6e7999fe4bb82 (diff)
Fix issues resolving poly proc fields and improve hover information of poly structs
Diffstat (limited to 'src/server/symbol.odin')
-rw-r--r--src/server/symbol.odin6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/symbol.odin b/src/server/symbol.odin
index b795a96..2d99d22 100644
--- a/src/server/symbol.odin
+++ b/src/server/symbol.odin
@@ -32,6 +32,7 @@ SymbolStructValue :: struct {
from_usings: []int,
unexpanded_usings: []int,
poly: ^ast.Field_List,
+ poly_names: []string, // The resolved names for the poly fields
args: []^ast.Expr, //The arguments in the call expression for poly
docs: []^ast.Comment_Group,
comments: []^ast.Comment_Group,
@@ -208,6 +209,7 @@ SymbolStructValueBuilder :: struct {
from_usings: [dynamic]int,
unexpanded_usings: [dynamic]int,
poly: ^ast.Field_List,
+ poly_names: [dynamic]string,
}
symbol_struct_value_builder_make_none :: proc(allocator := context.allocator) -> SymbolStructValueBuilder {
@@ -221,6 +223,7 @@ symbol_struct_value_builder_make_none :: proc(allocator := context.allocator) ->
usings = make(map[int]struct{}, allocator),
from_usings = make([dynamic]int, allocator),
unexpanded_usings = make([dynamic]int, allocator),
+ poly_names = make([dynamic]string, allocator),
}
}
@@ -239,6 +242,7 @@ symbol_struct_value_builder_make_symbol :: proc(
usings = make(map[int]struct{}, allocator),
from_usings = make([dynamic]int, allocator),
unexpanded_usings = make([dynamic]int, allocator),
+ poly_names = make([dynamic]string, allocator),
}
}
@@ -258,6 +262,7 @@ symbol_struct_value_builder_make_symbol_symbol_struct_value :: proc(
usings = v.usings,
from_usings = slice.to_dynamic(v.from_usings, allocator),
unexpanded_usings = slice.to_dynamic(v.unexpanded_usings, allocator),
+ poly_names = slice.to_dynamic(v.poly_names, allocator),
}
}
@@ -285,6 +290,7 @@ to_symbol_struct_value :: proc(b: SymbolStructValueBuilder) -> SymbolStructValue
from_usings = b.from_usings[:],
unexpanded_usings = b.unexpanded_usings[:],
poly = b.poly,
+ poly_names = b.poly_names[:],
}
}