diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-11-05 13:42:19 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-11-05 13:42:19 +0000 |
| commit | c937d38db2b31b885256b9aac0d606032f6c5343 (patch) | |
| tree | ce90ab9ff0cd888fa6092ecb852d6934b0bdc877 /src/docs_writer.cpp | |
| parent | c5556aa2e0c3cffc9f379ba00ce0d6d92e7ad79c (diff) | |
Improve doc-writer format for `#all_or_none`bill/all_or_none
Diffstat (limited to 'src/docs_writer.cpp')
| -rw-r--r-- | src/docs_writer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/docs_writer.cpp b/src/docs_writer.cpp index 9f6b3bc22..3edd7da9d 100644 --- a/src/docs_writer.cpp +++ b/src/docs_writer.cpp @@ -622,6 +622,12 @@ gb_internal OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type, bool ca if (type->Struct.is_raw_union) { doc_type.flags |= OdinDocTypeFlag_Struct_raw_union; } if (type->Struct.is_all_or_none) { doc_type.flags |= OdinDocTypeFlag_Struct_all_or_none; } + if (type->Struct.custom_min_field_align > 0 || type->Struct.custom_max_field_align > 0) { + doc_type.elem_count_len = 2; + doc_type.elem_counts[0] = cast(u32)gb_max(type->Struct.custom_min_field_align, 0); + doc_type.elem_counts[1] = cast(u32)gb_max(type->Struct.custom_max_field_align, 0); + } + auto fields = array_make<OdinDocEntityIndex>(heap_allocator(), type->Struct.fields.count); defer (array_free(&fields)); |