diff --git a/lang/ast/expr/arith.c b/lang/ast/expr/arith.c index f65e248..8e4d6b0 100644 --- a/lang/ast/expr/arith.c +++ b/lang/ast/expr/arith.c @@ -1276,7 +1276,7 @@ struct token_parse_result arith_parse_label( return PARSE_RESULT(IVY_ERR_BAD_SYNTAX, 0); } - if (expr_terminates_at_token(state, IVY_TOK_LABEL)) { + if (state->s_sub_type == EXPR_SUBTYPE_KEYWORD_ARG) { /* we are currently parsing a keyword or complex message * argument, and have just encountered the label denoting the * next argument. terminate here and propagate this label to the