Files
bshell/bshell/ast/word.c
T

15 lines
395 B
C
Raw Normal View History

2026-05-09 18:59:13 +01:00
#include "../parse/token.h"
#include "ast.h"
static void to_string(const struct ast_node *node, fx_bstr *out)
{
const struct word_ast_node *word = (const struct word_ast_node *)node;
fx_bstr_write_fmt(out, NULL, "%s", word->n_value->tok_str);
}
struct ast_node_definition word_ast_node = {
.def_id = AST_WORD,
.def_node_size = sizeof(struct word_ast_node),
.def_to_string = to_string,
};