Support struct field tags in odin doc format

This commit is contained in:
gingerBill
2022-01-04 11:44:34 +00:00
parent f15bb0b424
commit 17613185e7
3 changed files with 14 additions and 2 deletions

View File

@@ -598,6 +598,15 @@ OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) {
}
doc_type.where_clauses = odin_doc_where_clauses(w, st->where_clauses);
}
auto tags = array_make<OdinDocString>(heap_allocator(), type->Struct.fields.count);
defer (array_free(&tags));
for_array(i, type->Struct.fields) {
tags[i] = odin_doc_write_string(w, type->Struct.tags[i]);
}
doc_type.tags = odin_write_slice(w, tags.data, tags.count);
}
break;
case Type_Union: