diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-02-26 00:10:28 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-02-26 00:16:06 +0200 |
| commit | f89431c04360a664bcce6df60c4c6c7abeaad02b (patch) | |
| tree | 152e39239833a4ec2ae97d5d119f1585514cb92c /src | |
| parent | d1bf15ecbba872b499a539d1b9da8d45b2758fe2 (diff) | |
| download | fwd-f89431c04360a664bcce6df60c4c6c7abeaad02b.tar.gz fwd-f89431c04360a664bcce6df60c4c6c7abeaad02b.zip | |
remember to mark nodes lowered
Diffstat (limited to 'src')
| -rw-r--r-- | src/lower.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lower.c b/src/lower.c index 15db8aa..e2097b0 100644 --- a/src/lower.c +++ b/src/lower.c @@ -1032,7 +1032,7 @@ static int lower_type_def(struct state *state, struct ast *type) if (type_lowered(type)) return 0; - ast_flags(type, AST_FLAG_LOWERED); + ast_set_flags(type, AST_FLAG_LOWERED); char *decl_buf = NULL; size_t decl_len = 0; FILE *decl = open_memstream(&decl_buf, &decl_len); @@ -1062,6 +1062,7 @@ static int lower_type_def(struct state *state, struct ast *type) add_type(state, decl_buf); add_type(state, defn_buf); + return 0; } @@ -1070,6 +1071,8 @@ static int lower_proc(struct state *state, struct ast *proc) if (proc_lowered(state, proc)) return 0; + ast_set_flags(proc, AST_FLAG_LOWERED); + if (!proc_body(proc)) return lower_extern_proc(state, proc); @@ -1154,6 +1157,7 @@ static int lower_proc(struct state *state, struct ast *proc) free(start_of); free(proto); free(name); + return ret; } |
