lang: ast: implement control flags returned by parser functions
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user