From 294b712e6dabc722772f86aaa9d0faaa08c14717 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 11 Mar 2025 13:18:30 -0400 Subject: Don't use '$' prefix for field names --- structs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'structs.c') diff --git a/structs.c b/structs.c index ed0a0f7f..080791e5 100644 --- a/structs.c +++ b/structs.c @@ -52,8 +52,7 @@ CORD compile_struct_header(env_t *env, ast_t *ast) CORD fields = CORD_EMPTY; for (arg_ast_t *field = def->fields; field; field = field->next) { type_t *field_t = get_arg_ast_type(env, field); - CORD type_code = compile_type(field_t); - fields = CORD_all(fields, type_code, " $", field->name, field_t->tag == BoolType ? ":1" : CORD_EMPTY, ";\n"); + fields = CORD_all(fields, compile_declaration(field_t, field->name), field_t->tag == BoolType ? ":1" : CORD_EMPTY, ";\n"); } CORD struct_code = CORD_all("struct ", full_name, "$$struct {\n"); struct_code = CORD_all(struct_code, "};\n"); -- cgit v1.2.3