mie: parse: update parse_region_list to use new Op->Region linking mechanism
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user