diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-19 20:10:50 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-22 18:48:36 -0400 |
| commit | dc8fdcb3d55d613dc71044e7a549b15b00e12cc7 (patch) | |
| tree | 952fa71105631f61758072c96a03873d578403ba /src/server/collector.odin | |
| parent | ddd6485f6ea68e445ee893721b2696aa2ab91bc4 (diff) | |
Add proc attribute to hover information
Diffstat (limited to 'src/server/collector.odin')
| -rw-r--r-- | src/server/collector.odin | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/collector.odin b/src/server/collector.odin index fc4f603..ffff688 100644 --- a/src/server/collector.odin +++ b/src/server/collector.odin @@ -87,6 +87,7 @@ collect_procedure_fields :: proc( ) -> SymbolProcedureValue { returns := make([dynamic]^ast.Field, 0, collection.allocator) args := make([dynamic]^ast.Field, 0, collection.allocator) + attrs := make([dynamic]^ast.Attribute, 0, collection.allocator) if return_list != nil { for ret in return_list.list { @@ -104,6 +105,12 @@ collect_procedure_fields :: proc( } } + for attr in attributes { + cloned := cast(^ast.Attribute)clone_type(attr, collection.allocator, &collection.unique_strings) + append(&attrs, cloned) + } + + value := SymbolProcedureValue { return_types = returns[:], orig_return_types = returns[:], @@ -113,6 +120,7 @@ collect_procedure_fields :: proc( diverging = proc_type.diverging, calling_convention = clone_calling_convention(proc_type.calling_convention, collection.allocator, &collection.unique_strings), tags = proc_type.tags, + attributes = attrs[:], } return value |