diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-08-21 17:14:33 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-08-21 17:14:33 +0100 |
| commit | d5b1fc48fbc5f853e8995ca520417a69fbad701a (patch) | |
| tree | 6c83a207cd3e76f8bb49912f6ae838ef4b0afc95 /src/check_decl.cpp | |
| parent | 0c9e1f5807f84ef243dcece025757476ec18edc3 (diff) | |
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.
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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); + } } |