lang: ast: fix keyword arg parser not inheriting subexpr depth correctly

This commit is contained in:
2024-12-05 16:55:53 +00:00
parent fc0a943ae8
commit e23cd801c9

View File

@@ -991,7 +991,12 @@ struct token_parse_result arith_parse_label(
msg_expr->s_recipient = expr;
msg_expr->s_sub_type = EXPR_SUBTYPE_KEYWORD_MSG;
msg_expr->s_type = EXPR_TYPE_ARITH;
msg_expr->s_subexpr_depth = new_parser ? state->s_subexpr_depth + 1 : 0;
msg_expr->s_subexpr_depth = state->s_subexpr_depth;
if (new_parser) {
msg_expr->s_subexpr_depth++;
}
state = msg_expr;
}