lang: ast: initial implementation of class parser

This commit is contained in:
2024-11-25 16:50:42 +00:00
parent 19506a299c
commit f9b0096dd7
3 changed files with 160 additions and 0 deletions

View File

@@ -7,10 +7,14 @@
extern struct ast_node_type unit_node_ops;
extern struct ast_node_type unit_package_node_ops;
extern struct ast_node_type unit_import_node_ops;
extern struct ast_node_type class_node_ops;
static const struct ast_node_type *node_ops[] = {
[IVY_AST_UNIT] = &unit_node_ops,
[IVY_AST_UNIT_PACKAGE] = &unit_package_node_ops,
[IVY_AST_UNIT_IMPORT] = &unit_import_node_ops,
[IVY_AST_CLASS] = &class_node_ops,
};
static const size_t nr_node_ops = sizeof node_ops / sizeof node_ops[0];