lang: ast: implement support for multiple expression terminator tokens
This commit is contained in:
@@ -41,7 +41,7 @@ struct token_parse_result parse_match(struct ivy_parser *ctx, struct ivy_token *
|
||||
|
||||
state->s_prev_token = IVY_KW_MATCH;
|
||||
expr->s_subexpr_depth = 1;
|
||||
expr->s_terminator = IVY_KW_IN;
|
||||
expr_add_terminator(expr, IVY_KW_IN);
|
||||
|
||||
return PARSE_RESULT(IVY_OK, 0);
|
||||
}
|
||||
@@ -136,7 +136,7 @@ static struct token_parse_result parse_arrow(
|
||||
= (struct expr_parser_state *)parser_push_state(
|
||||
ctx, IVY_AST_EXPR, 0);
|
||||
|
||||
expr->s_terminator = IVY_KW_END;
|
||||
expr_add_terminator(expr, IVY_KW_END);
|
||||
expr->s_subexpr_depth = 1;
|
||||
return PARSE_RESULT(IVY_OK, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user