diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-24 21:20:56 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-24 21:56:09 -0400 |
| commit | 98d8cc304ee4e433e9011c1e2faef779ae86df35 (patch) | |
| tree | 49cc6f857b65d79ce0d4b1cd4bf17c0219afe365 /src/server/collector.odin | |
| parent | e4804807bb7c7a26b2bff10919d719a1a430870f (diff) | |
Correctly clone comment groups
Diffstat (limited to 'src/server/collector.odin')
| -rw-r--r-- | src/server/collector.odin | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/collector.odin b/src/server/collector.odin index 1bbe569..667e8c8 100644 --- a/src/server/collector.odin +++ b/src/server/collector.odin @@ -136,12 +136,15 @@ collect_struct_fields :: proc( if .Using in field.flags { append(&b.unexpanded_usings, len(b.names) - 1) + b.usings[len(b.names) - 1] = struct{}{} } append(&b.ranges, common.get_token_range(n, file.src)) - append(&b.docs, field.docs) - append(&b.comments, field.comment) + cloned_docs := clone_type(field.docs, collection.allocator, &collection.unique_strings) + append(&b.docs, cloned_docs) + cloned_comment := clone_type(field.comment, collection.allocator, &collection.unique_strings) + append(&b.comments, cloned_comment) append(&b.from_usings, -1) } } |