diff options
Diffstat (limited to 'ast.h')
| -rw-r--r-- | ast.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -0,0 +1,22 @@ +#define PAIR 0 + +typedef struct ast { + int type; + + union { + long i; + char *s; + double f; + struct { + struct ast *l; + struct ast *r; + } p; + } c; +} ast; + +ast *new_pair(ast *l, ast *r); +ast *new_int(char *s); +ast *new_float(char *s); +ast *new_id(char *id); + +void free_ast(ast *n); |
