lang: ast: implement parsing of inline and standalone if-else statements

This commit is contained in:
2024-12-04 16:35:19 +00:00
parent d2677e2038
commit c23523ce14
19 changed files with 641 additions and 134 deletions

View File

@@ -20,6 +20,8 @@ extern struct ast_node_type int_node_ops;
extern struct ast_node_type double_node_ops;
extern struct ast_node_type string_node_ops;
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;
static const struct ast_node_type *node_ops[] = {
[IVY_AST_UNIT] = &unit_node_ops,
@@ -37,6 +39,8 @@ static const struct ast_node_type *node_ops[] = {
[IVY_AST_DOUBLE] = &double_node_ops,
[IVY_AST_STRING] = &string_node_ops,
[IVY_AST_CASCADE] = &cascade_node_ops,
[IVY_AST_COND_GROUP] = &cond_group_node_ops,
[IVY_AST_COND] = &cond_node_ops,
};
static const size_t nr_node_ops = sizeof node_ops / sizeof node_ops[0];