lang: ast: add state size to ast_node_type

This commit is contained in:
2024-11-24 11:42:43 +00:00
parent f1ea916155
commit d43e387158
5 changed files with 18 additions and 13 deletions

View File

@@ -6,8 +6,7 @@ static enum ivy_status parse_package_keyword(
struct ivy_parser *ctx, struct ivy_token *tok)
{
parser_push_state(
ctx, IVY_AST_UNIT_PACKAGE, struct ivy_ast_unit_package_node,
struct unit_package_parser_state);
ctx, IVY_AST_UNIT_PACKAGE, struct ivy_ast_unit_package_node);
return IVY_OK;
}
@@ -24,6 +23,7 @@ static void print(struct ivy_ast_node *node)
struct ast_node_type unit_node_ops = {
.n_add_child = add_child,
.n_print = print,
.n_state_size = sizeof(struct parser_state),
.n_keyword_parsers = {
[IVY_KW_PACKAGE] = parse_package_keyword,
},