lang: ast: implement parsing of properties

This commit is contained in:
2024-12-06 19:47:27 +00:00
parent 603c6709fb
commit 1f7319458e
4 changed files with 410 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ extern struct ast_node_type match_node_ops;
extern struct ast_node_type while_loop_node_ops;
extern struct ast_node_type for_loop_node_ops;
extern struct ast_node_type return_node_ops;
extern struct ast_node_type property_node_ops;
extern struct ast_node_type discard_node_ops;
static const struct ast_node_type *node_ops[] = {
@@ -54,6 +55,7 @@ static const struct ast_node_type *node_ops[] = {
[IVY_AST_WHILE_LOOP] = &while_loop_node_ops,
[IVY_AST_FOR_LOOP] = &for_loop_node_ops,
[IVY_AST_RETURN] = &return_node_ops,
[IVY_AST_PROPERTY] = &property_node_ops,
[IVY_AST_DISCARD] = &discard_node_ops,
};
static const size_t nr_node_ops = sizeof node_ops / sizeof node_ops[0];