Mudancas no parser.y
[toypasc.git] / ast.h
blob55253721b83ccb565a582731505109bf9684b172
1 #ifndef AST_H
2 #define AST_H
4 #include "base.h"
5 #include "parser.h"
6 #include "symbol_table.h"
8 #define AST_CHILDREN_NUM 5
10 struct AstNode {
11 char *name;
12 int kind;
13 Type type;
14 Value value;
15 Symbol *symbol;
16 int linenum;
17 struct AstNode* children[AST_CHILDREN_NUM];
18 struct AstNode* next;
21 struct AstNode *ast_node_new(const char* name, int kind, int type,
22 int linenum, Symbol *symbol);
23 void ast_node_destroy(struct AstNode *node);
24 void ast_node_print(struct AstNode *node);
25 //void ast_node_print_graph(struct AstNode *node);
27 #endif // AST_H