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

@@ -109,7 +109,7 @@ static enum ivy_status state_fini(
const char *ident = var->s_var_ident->n_content->t_str;
struct mie_type *type = NULL;
if (var->s_value) {
type = mie_value_get_type(var->s_value);
type = mie_value_get_type(var->s_value, gen->c_ctx);
} else {
type = mie_ctx_get_type(gen->c_ctx, MIE_TYPE_ID);
}
@@ -117,6 +117,7 @@ static enum ivy_status state_fini(
struct codegen_var var_info = {
.v_node = (struct ivy_ast_node *)var->s_var_ident,
.v_type = type,
.v_flags = CODEGEN_VAR_F_PTR,
.v_value = var->s_var_ptr,
};