lang: ast: implement cascade operator parsing
This commit is contained in:
@@ -19,6 +19,7 @@ extern struct ast_node_type ident_node_ops;
|
||||
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;
|
||||
|
||||
static const struct ast_node_type *node_ops[] = {
|
||||
[IVY_AST_UNIT] = &unit_node_ops,
|
||||
@@ -35,6 +36,7 @@ static const struct ast_node_type *node_ops[] = {
|
||||
[IVY_AST_INT] = &int_node_ops,
|
||||
[IVY_AST_DOUBLE] = &double_node_ops,
|
||||
[IVY_AST_STRING] = &string_node_ops,
|
||||
[IVY_AST_CASCADE] = &cascade_node_ops,
|
||||
};
|
||||
static const size_t nr_node_ops = sizeof node_ops / sizeof node_ops[0];
|
||||
|
||||
@@ -224,6 +226,7 @@ const char *ivy_ast_node_type_to_string(enum ivy_ast_node_type v)
|
||||
ENUM_STR(IVY_AST_IDENT);
|
||||
ENUM_STR(IVY_AST_FOR_LOOP);
|
||||
ENUM_STR(IVY_AST_WHILE_LOOP);
|
||||
ENUM_STR(IVY_AST_CASCADE);
|
||||
ENUM_STR(IVY_AST_COND_GROUP);
|
||||
ENUM_STR(IVY_AST_COND);
|
||||
ENUM_STR(IVY_AST_TUPLE);
|
||||
|
||||
Reference in New Issue
Block a user