blob: 7645febdfca41f61dc5733e0d330132f8a2deb97 (
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
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef __types_h_
#define __types_h_
#include <stdbool.h>
#include <stdlib.h>
#define MAXASS 4096
#define MAXARG 12
typedef struct ast ast;
typedef struct values values;
typedef enum type {
FUN,
INT,
} type;
typedef struct ast {
char *fname;
values *vals;
} ast;
typedef struct values {
int argc;
type ts[MAXARG];
union {
int is[MAXARG];
ast *as[MAXARG];
};
} values;
ast *newast(char *fname);
values *newastval(ast *a);
values *newintval(int i);
values *addval(values *vs, values *v);
#endif
|