lang: ast: implement node, parser, and parser state management

This commit is contained in:
2024-11-23 19:28:03 +00:00
parent b630aa009c
commit ed35011931
3 changed files with 153 additions and 4 deletions

View File

@@ -65,6 +65,7 @@ struct ivy_ast_node {
struct ivy_ast_unit_node {
struct ivy_ast_node n_base;
b_queue n_children;
};
struct ivy_ast_op_node {
@@ -229,7 +230,7 @@ IVY_API void ivy_parser_destroy(struct ivy_parser *parser);
IVY_API enum ivy_status ivy_parser_get_status(struct ivy_parser *parser);
IVY_API void ivy_parser_push_token(struct ivy_parser *lex, struct ivy_token *tok);
IVY_API enum ivy_status ivy_parser_push_token(struct ivy_parser *parser, struct ivy_token *tok);
IVY_API void ivy_ast_node_destroy(struct ivy_ast_node *node);