lang: ast: use fancy index manipulation to reduce the size of ast_node_type

This commit is contained in:
2024-11-28 10:56:43 +00:00
parent f04c858d9a
commit fc76fe6ad4
10 changed files with 80 additions and 64 deletions

View File

@@ -58,7 +58,7 @@ struct ast_node_type block_node_ops = {
.n_state_size = sizeof(struct block_parser_state),
.n_node_size = sizeof(struct ivy_ast_block_node),
.n_keyword_parsers = {
[IVY_KW_END] = parse_end,
KW_PARSER(END, parse_end),
},
.n_expr_parser = {
.expr_begin = parse_expr_begin,