2024-11-28 22:05:37 +00:00
|
|
|
#include "ctx.h"
|
|
|
|
|
#include "node.h"
|
|
|
|
|
|
2024-12-01 13:25:36 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
2024-11-28 22:05:37 +00:00
|
|
|
static void print(struct ivy_ast_node *node)
|
|
|
|
|
{
|
|
|
|
|
struct ivy_ast_ident_node *ident = (struct ivy_ast_ident_node *)node;
|
|
|
|
|
|
2024-12-01 13:25:36 +00:00
|
|
|
printf("%s (%s)\n", ivy_ast_node_type_to_string(node->n_type),
|
|
|
|
|
ident->n_content->t_str);
|
2024-11-28 22:05:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct ast_node_type ident_node_ops = {
|
|
|
|
|
.n_print = print,
|
2024-11-29 12:06:06 +00:00
|
|
|
.n_state_size = sizeof(struct parser_state),
|
|
|
|
|
.n_node_size = sizeof(struct ivy_ast_ident_node),
|
2024-11-28 22:05:37 +00:00
|
|
|
};
|