diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-11 13:18:30 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-11 13:18:30 -0400 |
| commit | 294b712e6dabc722772f86aaa9d0faaa08c14717 (patch) | |
| tree | f24ab45434d5bf2d5ebd64b0d533d4d361e9daff /structs.c | |
| parent | d254b440f8359b42a097edfeb2db1585fd20c695 (diff) | |
Don't use '$' prefix for field names
Diffstat (limited to 'structs.c')
| -rw-r--r-- | structs.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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"); |
