Add @(raddbg_type_view=<optional-string>)

If no string parameter is provided, then one will be generated from the struct field tags.
The attribute must be applied if the automatic struct field tag approach is to be used.
This commit is contained in:
gingerBill
2025-08-21 17:14:33 +01:00
parent 0c9e1f5807
commit d5b1fc48fb
4 changed files with 210 additions and 0 deletions

View File

@@ -602,6 +602,13 @@ gb_internal void check_type_decl(CheckerContext *ctx, Entity *e, Ast *init_expr,
} else if (ac.objc_is_implementation) {
error(e->token, "@(objc_implement) may only be applied when the @(objc_class) attribute is also applied");
}
if (ac.raddbg_type_view) {
RaddbgTypeView type_view = {};
type_view.type = e->type;
type_view.view = ac.raddbg_type_view_string;
mpsc_enqueue(&ctx->info->raddbg_type_views_queue, type_view);
}
}