lang: ast: implement control flags returned by parser functions

This commit is contained in:
2024-11-26 21:30:40 +00:00
parent 740df312a9
commit cd89c20beb
9 changed files with 177 additions and 98 deletions

View File

@@ -9,12 +9,16 @@ 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;
extern struct ast_node_type msgh_node_ops;
extern struct ast_node_type selector_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,
[IVY_AST_MSGH] = &msgh_node_ops,
[IVY_AST_SELECTOR] = &selector_node_ops,
};
static const size_t nr_node_ops = sizeof node_ops / sizeof node_ops[0];