lang: codegen: implement cond-group code generation

This commit is contained in:
2025-04-28 15:44:44 +01:00
parent 6af9b62b88
commit 64d1015a3c
8 changed files with 327 additions and 22 deletions

View File

@@ -239,7 +239,7 @@ static struct code_generator_state *get_current_generator_state(
return b_unbox(struct code_generator_state, entry, s_entry);
}
enum ivy_status ivy_codegen_create(struct ivy_codegen **out)
enum ivy_status ivy_codegen_create(struct mie_ctx *ctx, struct ivy_codegen **out)
{
struct ivy_codegen *gen = malloc(sizeof *gen);
if (!gen) {
@@ -248,7 +248,7 @@ enum ivy_status ivy_codegen_create(struct ivy_codegen **out)
memset(gen, 0x0, sizeof *gen);
gen->c_ctx = mie_ctx_create();
gen->c_ctx = ctx;
*out = gen;
return IVY_OK;