6 #include "symbol_table.h"
15 struct AstNode
* children
;
16 struct AstNode
* sibling
;
19 struct AstNode
*ast_node_new(const char* name
, int kind
, int type
,
20 int linenum
, Symbol
*symbol
);
21 void ast_node_destroy(struct AstNode
*node
);
23 void ast_node_add_child(struct AstNode
*node
, struct AstNode
*child
);
24 void ast_node_add_sibling(struct AstNode
*node
, struct AstNode
*sibling
);
26 Type
ast_node_get_type(struct AstNode
*node
);
27 void ast_node_set_type(struct AstNode
*node
, Type type
);
29 void ast_node_fill_symbol_table(struct AstNode
*node
, Symbol
*symtab
);
31 void ast_node_print(struct AstNode
*node
);
32 void ast_node_print_graph(struct AstNode
*node
, Symbol
*sym_table
);