Files
ivy/lang/ast/int.c

16 lines
405 B
C

#include "ctx.h"
#include "node.h"
static void print(struct ivy_ast_node *node)
{
struct ivy_ast_int_node *v = (struct ivy_ast_int_node *)node;
printf("%s (%llu)\n", ivy_ast_node_type_to_string(node->n_type), v->n_value->t_int);
}
struct ast_node_type int_node_ops = {
.n_print = print,
.n_state_size = sizeof(struct parser_state),
.n_node_size = sizeof(struct ivy_ast_int_node),
};