mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 06:38:47 +00:00
Add support for matrix type in doc format
This commit is contained in:
@@ -82,6 +82,7 @@ enum OdinDocTypeKind : u32 {
|
|||||||
OdinDocType_RelativePointer = 20,
|
OdinDocType_RelativePointer = 20,
|
||||||
OdinDocType_RelativeSlice = 21,
|
OdinDocType_RelativeSlice = 21,
|
||||||
OdinDocType_MultiPointer = 22,
|
OdinDocType_MultiPointer = 22,
|
||||||
|
OdinDocType_Matrix = 23,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum OdinDocTypeFlag_Basic : u32 {
|
enum OdinDocTypeFlag_Basic : u32 {
|
||||||
|
|||||||
@@ -756,6 +756,14 @@ OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) {
|
|||||||
doc_type.types = odin_write_slice(w, types, gb_count_of(types));
|
doc_type.types = odin_write_slice(w, types, gb_count_of(types));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Type_Matrix:
|
||||||
|
doc_type.kind = OdinDocType_Matrix;
|
||||||
|
doc_type.elem_count_len = 2;
|
||||||
|
doc_type.elem_counts[0] = type->Matrix.row_count;
|
||||||
|
doc_type.elem_counts[1] = type->Matrix.column_count;
|
||||||
|
doc_type.types = odin_doc_type_as_slice(w, type->Matrix.elem);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dst) {
|
if (dst) {
|
||||||
|
|||||||
Reference in New Issue
Block a user