mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-06 04:57:55 +00:00
Add missing doc_format flags for entities and improve docs for the odin package
This commit is contained in:
@@ -813,19 +813,28 @@ OdinDocEntityIndex odin_doc_add_entity(OdinDocWriter *w, Entity *e) {
|
||||
break;
|
||||
case Entity_Variable:
|
||||
if (e->Variable.is_foreign) { flags |= OdinDocEntityFlag_Foreign; }
|
||||
if (e->Variable.is_export) { flags |= OdinDocEntityFlag_Export; }
|
||||
if (e->Variable.is_export) { flags |= OdinDocEntityFlag_Export; }
|
||||
if (e->Variable.thread_local_model != "") {
|
||||
flags |= OdinDocEntityFlag_Var_Thread_Local;
|
||||
}
|
||||
if (e->flags & EntityFlag_Static) { flags |= OdinDocEntityFlag_Var_Static; }
|
||||
link_name = e->Variable.link_name;
|
||||
break;
|
||||
case Entity_Procedure:
|
||||
if (e->Procedure.is_foreign) { flags |= OdinDocEntityFlag_Foreign; }
|
||||
if (e->Procedure.is_export) { flags |= OdinDocEntityFlag_Export; }
|
||||
if (e->Procedure.is_export) { flags |= OdinDocEntityFlag_Export; }
|
||||
link_name = e->Procedure.link_name;
|
||||
break;
|
||||
}
|
||||
|
||||
if (e->flags & EntityFlag_Param) {
|
||||
if (e->flags & EntityFlag_Using) { flags |= OdinDocEntityFlag_Param_Using; }
|
||||
if (e->flags & EntityFlag_ConstInput) { flags |= OdinDocEntityFlag_Param_Const; }
|
||||
if (e->flags & EntityFlag_AutoCast) { flags |= OdinDocEntityFlag_Param_AutoCast; }
|
||||
if (e->flags & EntityFlag_Ellipsis) { flags |= OdinDocEntityFlag_Param_Ellipsis; }
|
||||
if (e->flags & EntityFlag_NoAlias) { flags |= OdinDocEntityFlag_Param_NoAlias; }
|
||||
}
|
||||
|
||||
OdinDocString init_string = {};
|
||||
if (init_expr) {
|
||||
init_string = odin_doc_expr_string(w, init_expr);
|
||||
|
||||
Reference in New Issue
Block a user