lang: ast: implement support for multiple expression terminator tokens

This commit is contained in:
2024-12-07 21:28:25 +00:00
parent 7e3322e2ad
commit e8c30b65b5
12 changed files with 68 additions and 30 deletions

View File

@@ -175,7 +175,7 @@ static struct token_parse_result parse_equal_right_arrow(
struct expr_parser_state *expr
= (struct expr_parser_state *)parser_push_state(
ctx, IVY_AST_EXPR, 0);
expr->s_terminator = IVY_SYM_COMMA;
expr_add_terminator(expr, IVY_SYM_COMMA);
expr->s_subexpr_depth = 1;
return PARSE_RESULT(IVY_OK, 0);