From 84f3704db00b3b4c73dc359606a15b5cc186cceb Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 4 Dec 2024 16:41:18 +0000 Subject: [PATCH] lang: ast: fix expr_finalise not handling complex message terminator --- lang/ast/expr/arith.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lang/ast/expr/arith.c b/lang/ast/expr/arith.c index 2c20225..ef850d0 100644 --- a/lang/ast/expr/arith.c +++ b/lang/ast/expr/arith.c @@ -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);