diff --git a/mie/include/mie/parse/parser.h b/mie/include/mie/parse/parser.h index 4eb53d3..5b65188 100644 --- a/mie/include/mie/parse/parser.h +++ b/mie/include/mie/parse/parser.h @@ -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); diff --git a/mie/parse/parser.c b/mie/parse/parser.c index 75ddccb..e65405e 100644 --- a/mie/parse/parser.c +++ b/mie/parse/parser.c @@ -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; }