Support for using on procedure struct typed arguments

This commit is contained in:
ed
2025-07-18 23:48:32 -04:00
parent c3da99eac5
commit 747098efaf
3 changed files with 56 additions and 16 deletions
-13
View File
@@ -2711,19 +2711,6 @@ gb_internal void lb_build_assign_stmt(lbProcedure *p, AstAssignStmt *as) {
}
}
// NOTE(Ed) - Sectr Fork: Added for namespaced names on using statements in debug
// Format: struct_name::field_name
// I tired todo struct_name.field_name it didn't work (nor using struct_name.field_name)
char* debug_lb_make_using_struct_ref_identifier(gbAllocator allocator, String struct_name, String field_name) {
isize name_len = 2 + struct_name.len + 1 + field_name.len + 1;
char* debug_name = gb_alloc_array(allocator, char, name_len);
gb_snprintf(debug_name, name_len, "%.*s::%.*s"
, LIT(struct_name)
, LIT(field_name)
);
return debug_name;
}
gb_internal void lb_build_stmt(lbProcedure *p, Ast *node) {
Ast *prev_stmt = p->curr_stmt;
defer (p->curr_stmt = prev_stmt);