blob: 7b2a35e7cba474c28ccc4c4badd17bdff6dfdbd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef AST_H
#define AST_H
#include <stdlib.h>
enum NODE_TYPE {
PROGRAM_NODE,
TYPE_NODE,
ARGUMENT_NODE
};
typedef struct ast_node_data {
void* value;
void* type;
} ast_node_data;
typedef struct ast_node {
int type;
ast_node_data* data;
struct ast_node* left;
struct ast_node* right;
} ast_node;
ast_node* create_program_node(ast_node* previous_node, ast_node* current_node);
#endif // AST_H
|