lang: ast: add support for multiple block termination tokens

This commit is contained in:
2025-01-16 13:15:18 +00:00
parent fa33336ed7
commit 143d61e329
7 changed files with 102 additions and 31 deletions

View File

@@ -29,7 +29,7 @@ static struct token_parse_result parse_expr_begin(
struct block_parser_state *block
= (struct block_parser_state *)parser_push_state(
ctx, IVY_AST_BLOCK, 0);
block->s_terminator = IVY_SYM_RIGHT_BRACKET;
block_add_terminator(block, IVY_SYM_RIGHT_BRACKET);
return PARSE_RESULT(IVY_OK, PARSE_REPEAT_TOKEN);
}