diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-03-09 14:02:19 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-03-09 14:02:19 -0500 |
| commit | 955f047e069497be4cbeffa3e0309360aeb1efa7 (patch) | |
| tree | 20b59546bb79c75d368739959d15c28317e913bd /enums.c | |
| parent | 0921f3723bf7fe7539aa7a5dfdbd921f445777af (diff) | |
First pass at lambdas/closures
Diffstat (limited to 'enums.c')
| -rw-r--r-- | enums.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -114,9 +114,7 @@ void compile_enum_def(env_t *env, ast_t *ast) CORD arg_sig = CORD_EMPTY; for (arg_ast_t *field = tag->fields; field; field = field->next) { type_t *field_t = get_arg_ast_type(env, field); - CORD type_code = compile_type(field_t); - arg_sig = CORD_all(arg_sig, type_code, " ", field->name); - if (CORD_cmp(type_code, "Bool_t") == 0) arg_sig = CORD_cat(arg_sig, ":1"); + arg_sig = CORD_all(arg_sig, compile_declaration(field_t, field->name)); if (field->next) arg_sig = CORD_cat(arg_sig, ", "); } if (arg_sig == CORD_EMPTY) arg_sig = "void"; |
