From d5b1fc48fbc5f853e8995ca520417a69fbad701a Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 21 Aug 2025 17:14:33 +0100 Subject: Add `@(raddbg_type_view=)` 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. --- src/check_decl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/check_decl.cpp') diff --git a/src/check_decl.cpp b/src/check_decl.cpp index b2522f24a..7dd9db105 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -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); + } } -- cgit v1.2.3