lang: ast: implement parsing of while-loops

This commit is contained in:
2024-12-05 19:29:21 +00:00
parent e23cd801c9
commit 1a4d6089a1
6 changed files with 261 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ extern struct ast_node_type cascade_node_ops;
extern struct ast_node_type cond_group_node_ops;
extern struct ast_node_type cond_node_ops;
extern struct ast_node_type match_node_ops;
extern struct ast_node_type while_loop_node_ops;
extern struct ast_node_type discard_node_ops;
static const struct ast_node_type *node_ops[] = {
@@ -44,6 +45,7 @@ static const struct ast_node_type *node_ops[] = {
[IVY_AST_COND_GROUP] = &cond_group_node_ops,
[IVY_AST_COND] = &cond_node_ops,
[IVY_AST_MATCH] = &match_node_ops,
[IVY_AST_WHILE_LOOP] = &while_loop_node_ops,
[IVY_AST_DISCARD] = &discard_node_ops,
};
static const size_t nr_node_ops = sizeof node_ops / sizeof node_ops[0];