Pasta das funcoes em pascal
[toypasc.git] / ast.h
blob1cf0c36c467412a22824c6507ffbf2fe48eac609
1 #ifndef AST_H
2 #define AST_H
4 #include "base.h"
5 #include "parser.h"
6 #include "symbol_table.h"
8 struct AstNode {
9 char *name;
10 int kind;
11 Type type;
12 Value value;
13 Symbol *symbol;
14 int linenum;
15 struct AstNode* children[3];
16 struct AstNode* next;
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);
22 void ast_node_print(struct AstNode *node);
23 //void ast_node_print_graph(struct AstNode *node);
25 #endif // AST_H