lang: ast: fix parens not allowing sub-keyword messages
previously, an expression like: x arg1:a arg2:(c subArg:d). were being parsed incorrectly. This expression was parsed as single -arg1:arg2:subArg: message being sent to x. the parentheses around the `c subArg:d` sub-expression were being ignored. now, this expression is correcly parsed as the value of `c subArg:d` being passed as a parameter to the message -arg1:arg2:
This commit is contained in:
@@ -1276,7 +1276,7 @@ struct token_parse_result arith_parse_label(
|
|||||||
return PARSE_RESULT(IVY_ERR_BAD_SYNTAX, 0);
|
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
|
/* we are currently parsing a keyword or complex message
|
||||||
* argument, and have just encountered the label denoting the
|
* argument, and have just encountered the label denoting the
|
||||||
* next argument. terminate here and propagate this label to the
|
* next argument. terminate here and propagate this label to the
|
||||||
|
|||||||
Reference in New Issue
Block a user