diff options
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -0,0 +1,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 |