mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-26 07:25:00 -07:00
Improve docs_writer.cpp
This commit is contained in:
+1
-1
@@ -513,7 +513,7 @@ OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) {
|
||||
break;
|
||||
case Type_Generic:
|
||||
doc_type.kind = OdinDocType_Generic;
|
||||
doc_type.name = odin_doc_write_string(w, type->Generic.name);
|
||||
doc_type.name = odin_doc_write_string(w, type->Generic.entity->token.string);
|
||||
if (type->Generic.specialized) {
|
||||
doc_type.types = odin_doc_type_as_slice(w, type->Generic.specialized);
|
||||
}
|
||||
|
||||
+5
-9
@@ -3933,7 +3933,7 @@ gbString write_type_to_string(gbString str, Type *type) {
|
||||
str = gb_string_appendc(str, " = ");
|
||||
str = write_exact_value_to_string(str, var->Constant.value);
|
||||
} else {
|
||||
str = gb_string_appendc(str, "=");
|
||||
str = gb_string_appendc(str, " := ");
|
||||
str = write_exact_value_to_string(str, var->Constant.value);
|
||||
}
|
||||
continue;
|
||||
@@ -3961,14 +3961,10 @@ gbString write_type_to_string(gbString str, Type *type) {
|
||||
str = gb_string_appendc(str, "typeid/");
|
||||
str = write_type_to_string(str, var->type);
|
||||
} else {
|
||||
if (var->kind == Entity_TypeName) {
|
||||
str = gb_string_appendc(str, "$");
|
||||
str = gb_string_append_length(str, name.text, name.len);
|
||||
str = gb_string_appendc(str, "=");
|
||||
str = write_type_to_string(str, var->type);
|
||||
} else {
|
||||
str = gb_string_appendc(str, "typeid");
|
||||
}
|
||||
str = gb_string_appendc(str, "$");
|
||||
str = gb_string_append_length(str, name.text, name.len);
|
||||
str = gb_string_appendc(str, "=");
|
||||
str = write_type_to_string(str, var->type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user