blob: 06f4ee31164cc1c90ba0dbc508d4781783f5669a (
plain) (
blame)
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
27
28
|
#ifndef TREE_H
#define TREE_H
#include <stdlib.h>
typedef struct TREE_STRUC {
enum {
TREE_DEF,
TREE_CALL,
TREE_STRING,
TREE_INT,
} type;
union {
struct def {
char* name; // name of definition
int mutability; // mutability of definition
struct TREE_STRUC* value; // value of definition
};
struct call {
char* target; // name of definition being called
struct TREE_STRUC** args; // arguments passed to definition
};
} data;
} tree_t;
#endif
|