lang: ast: fix parsing of parenthesised sub-expressions in keyword arguments
This commit is contained in:
@@ -819,8 +819,14 @@ static enum ivy_status add_child(
|
|||||||
|| state->s_subexpr == EXPR_SUBTYPE_COMPLEX_MSG) {
|
|| state->s_subexpr == EXPR_SUBTYPE_COMPLEX_MSG) {
|
||||||
/* treat the child node as a keyword-message argument */
|
/* treat the child node as a keyword-message argument */
|
||||||
b_queue_push_back(&state->s_args, &child->n_entry);
|
b_queue_push_back(&state->s_args, &child->n_entry);
|
||||||
|
} else if (state->s_subexpr == EXPR_SUBTYPE_KEYWORD_ARG) {
|
||||||
|
/* treat the child node as a sub-expression enclosed in
|
||||||
|
* parentheses (i.e. an operand). */
|
||||||
|
b_queue_push_back(&state->s_output_queue, &child->n_entry);
|
||||||
|
state->s_prev_component = EXPR_CMP_OPERAND;
|
||||||
} else if (child->n_type == IVY_AST_MSG) {
|
} else if (child->n_type == IVY_AST_MSG) {
|
||||||
push_operator(state, child);
|
push_operator(state, child);
|
||||||
|
state->s_prev_component = EXPR_CMP_MSG;
|
||||||
} else {
|
} else {
|
||||||
/* treat the child node as a sub-expression enclosed in
|
/* treat the child node as a sub-expression enclosed in
|
||||||
* parentheses (i.e. an operand). */
|
* parentheses (i.e. an operand). */
|
||||||
|
|||||||
Reference in New Issue
Block a user