mie: parse: update parse_region_list to use new Op->Region linking mechanism

This commit is contained in:
2026-01-25 15:05:18 +00:00
parent 9e546ee32f
commit 00c7c3d5ea
2 changed files with 5 additions and 9 deletions

View File

@@ -107,8 +107,7 @@ MIE_API bool mie_parser_parse_register_list(
MIE_API bool mie_parser_parse_region(
struct mie_parser *ctx, struct mie_op *parent, struct mie_region *region);
MIE_API bool mie_parser_parse_region_list(
struct mie_parser *ctx, struct mie_op *parent,
MIE_VECTOR_REF_PARAM(struct mie_region, out));
struct mie_parser *ctx, struct mie_op *parent);
MIE_API bool mie_parser_parse_anonymous_block(
struct mie_parser *ctx, struct mie_name_map *names,
struct mie_block *block);

View File

@@ -798,15 +798,13 @@ bool mie_parser_parse_region(
return true;
}
bool mie_parser_parse_region_list(
struct mie_parser *ctx, struct mie_op *parent,
MIE_VECTOR_REF_PARAM(struct mie_region, out))
bool mie_parser_parse_region_list(struct mie_parser *ctx, struct mie_op *parent)
{
if (!mie_parser_check_symbol(ctx, MIE_SYM_LEFT_BRACE)) {
return false;
}
struct mie_region *region = mie_vector_ref_emplace_back(out, NULL);
struct mie_region *region = mie_op_add_region(parent);
if (!mie_parser_parse_region(ctx, parent, region)) {
return false;
@@ -821,7 +819,7 @@ bool mie_parser_parse_region_list(
break;
}
struct mie_region *region = mie_vector_ref_emplace_back(out, NULL);
struct mie_region *region = mie_op_add_region(parent);
if (!mie_parser_parse_region(ctx, parent, region)) {
@@ -1087,8 +1085,7 @@ static bool parse_generic_op(
if (mie_parser_parse_symbol(ctx, MIE_SYM_LEFT_PAREN)) {
mie_parser_parse_linefeed(ctx);
if (!mie_parser_parse_region_list(
ctx, dest, MIE_VECTOR_REF(dest->op_regions))) {
if (!mie_parser_parse_region_list(ctx, dest)) {
return false;
}