Files
bshell/bshell/ast/int.c
T
2026-05-09 18:59:13 +01:00

15 lines
374 B
C

#include "../parse/token.h"
#include "ast.h"
static void to_string(const struct ast_node *node, fx_bstr *out)
{
struct int_ast_node *i = (struct int_ast_node *)node;
fx_bstr_write_fmt(out, NULL, "%lld", i->n_value->tok_int);
}
struct ast_node_definition int_ast_node = {
.def_id = AST_INT,
.def_node_size = sizeof(struct int_ast_node),
.def_to_string = to_string,
};