@@ -94,6 +94,7 @@ enum OdinDocTypeFlag_Struct : u32 {
9494 OdinDocTypeFlag_Struct_polymorphic = 1 <<0 ,
9595 OdinDocTypeFlag_Struct_packed = 1 <<1 ,
9696 OdinDocTypeFlag_Struct_raw_union = 1 <<2 ,
97+ OdinDocTypeFlag_Struct_all_or_none = 1 <<3 ,
9798};
9899
99100enum OdinDocTypeFlag_Union : u32 {
@@ -124,21 +125,76 @@ enum {
124125
125126struct OdinDocType {
126127 OdinDocTypeKind kind;
128+ // Type_Kind specific used by some types
129+ // Underlying flag types:
130+ // .Basic - Type_Flags_Basic
131+ // .Struct - Type_Flags_Struct
132+ // .Union - Type_Flags_Union
133+ // .Proc - Type_Flags_Proc
134+ // .Bit_Set - Type_Flags_Bit_Set
127135 u32 flags;
136+
137+ // Used by:
138+ // .Basic
139+ // .Named
140+ // .Generic
128141 OdinDocString name;
142+
143+ // Used By: .Struct, .Union
129144 OdinDocString custom_align;
130145
131- // Used by some types
146+ // Used by:
147+ // .Array - 1 count: 0=len
148+ // .Enumerated_Array - 1 count: 0=len
149+ // .SOA_Struct_Fixed - 1 count: 0=len
150+ // .Bit_Set - 2 count: 0=lower, 1=upper
151+ // .Simd_Vector - 1 count: 0=len
152+ // .Matrix - 2 count: 0=row_count, 1=column_count
153+ // .Struct - <=2 count: 0=min_field_align, 1=max_field_align
132154 u32 elem_count_len;
133155 i64 elem_counts[OdinDocType_ElemsCap];
134156
135- // Each of these is esed by some types, not all
157+ // Used by: .Procedures
158+ // blank implies the "odin" calling convention
136159 OdinDocString calling_convention;
160+
161+ // Used by:
162+ // .Named - 1 type: 0=base type
163+ // .Generic - <1 type: 0=specialization
164+ // .Pointer - 1 type: 0=element
165+ // .Array - 1 type: 0=element
166+ // .Enumerated_Array - 2 types: 0=index and 1=element
167+ // .Slice - 1 type: 0=element
168+ // .Dynamic_Array - 1 type: 0=element
169+ // .Map - 2 types: 0=key, 1=value
170+ // .SOA_Struct_Fixed - 1 type: underlying SOA struct element
171+ // .SOA_Struct_Slice - 1 type: underlying SOA struct element
172+ // .SOA_Struct_Dynamic - 1 type: underlying SOA struct element
173+ // .Union - 0+ types: variants
174+ // .Enum - <1 type: 0=base type
175+ // .Proc - 2 types: 0=parameters, 1=results
176+ // .Bit_Set - <=2 types: 0=element type, 1=underlying type (Underlying_Type flag will be set)
177+ // .Simd_Vector - 1 type: 0=element
178+ // .Relative_Pointer - 2 types: 0=pointer type, 1=base integer
179+ // .Multi_Pointer - 1 type: 0=element
180+ // .Matrix - 1 type: 0=element
181+ // .Soa_Pointer - 1 type: 0=element
182+ // .Bit_Field - 1 type: 0=backing type
137183 OdinDocArray<OdinDocTypeIndex> types;
184+
185+ // Used by:
186+ // .Named - 1 field for the definition
187+ // .Struct - fields
188+ // .Enum - fields
189+ // .Parameters - parameters (procedures only)
138190 OdinDocArray<OdinDocEntityIndex> entities;
191+
192+ // Used By: .Struct, .Union
139193 OdinDocTypeIndex polmorphic_params;
194+ // Used By: .Struct, .Union
140195 OdinDocArray<OdinDocString> where_clauses;
141- OdinDocArray<OdinDocString> tags; // struct field tags
196+ // Used By: .Struct
197+ OdinDocArray<OdinDocString> tags;
142198};
143199
144200struct OdinDocAttribute {
0 commit comments