mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Fix enumerated arrays for .odin-doc
This commit is contained in:
+1
-1
@@ -131,7 +131,7 @@ struct OdinDocType {
|
|||||||
|
|
||||||
// Used by some types
|
// Used by some types
|
||||||
u32 elem_count_len;
|
u32 elem_count_len;
|
||||||
u64 elem_counts[OdinDocType_ElemsCap];
|
i64 elem_counts[OdinDocType_ElemsCap];
|
||||||
|
|
||||||
// Each of these is esed by some types, not all
|
// Each of these is esed by some types, not all
|
||||||
OdinDocArray<OdinDocTypeIndex> types;
|
OdinDocArray<OdinDocTypeIndex> types;
|
||||||
|
|||||||
+8
-3
@@ -544,7 +544,12 @@ OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) {
|
|||||||
doc_type.kind = OdinDocType_EnumeratedArray;
|
doc_type.kind = OdinDocType_EnumeratedArray;
|
||||||
doc_type.elem_count_len = 1;
|
doc_type.elem_count_len = 1;
|
||||||
doc_type.elem_counts[0] = type->EnumeratedArray.count;
|
doc_type.elem_counts[0] = type->EnumeratedArray.count;
|
||||||
doc_type.types = odin_doc_type_as_slice(w, type->EnumeratedArray.elem);
|
{
|
||||||
|
OdinDocTypeIndex types[2] = {};
|
||||||
|
types[0] = odin_doc_type(w, type->EnumeratedArray.index);
|
||||||
|
types[1] = odin_doc_type(w, type->EnumeratedArray.elem);
|
||||||
|
doc_type.types = odin_write_slice(w, types, gb_count_of(types));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Type_Slice:
|
case Type_Slice:
|
||||||
doc_type.kind = OdinDocType_Slice;
|
doc_type.kind = OdinDocType_Slice;
|
||||||
@@ -686,8 +691,8 @@ OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) {
|
|||||||
}
|
}
|
||||||
doc_type.types = odin_write_slice(w, types, type_count);
|
doc_type.types = odin_write_slice(w, types, type_count);
|
||||||
doc_type.elem_count_len = 2;
|
doc_type.elem_count_len = 2;
|
||||||
doc_type.elem_counts[0] = cast(u64)type->BitSet.lower;
|
doc_type.elem_counts[0] = type->BitSet.lower;
|
||||||
doc_type.elem_counts[1] = cast(u64)type->BitSet.upper;
|
doc_type.elem_counts[1] = type->BitSet.upper;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Type_SimdVector:
|
case Type_SimdVector:
|
||||||
|
|||||||
Reference in New Issue
Block a user