lang: ast: fix expr_finalise not handling complex message terminator

This commit is contained in:
2024-12-04 16:41:18 +00:00
parent 04ee7d77c0
commit 84f3704db0

View File

@@ -788,6 +788,13 @@ struct token_parse_result expr_finalise(
return PARSE_RESULT(IVY_OK, flags);
}
if (state->s_sub_type == EXPR_SUBTYPE_COMPLEX_MSG) {
/* this is the end of a keyword-message */
struct ivy_ast_msg_node *msg = expr_finalise_complex_msg(state);
*result = msg;
return PARSE_RESULT(IVY_OK, 0);
}
if (state->s_sub_type == EXPR_SUBTYPE_KEYWORD_MSG) {
/* this is the end of a keyword-message */
struct ivy_ast_msg_node *msg = expr_finalise_keyword_msg(state);