diff options
| author | Tom Harley | 2020-02-26 02:33:42 +0000 |
|---|---|---|
| committer | Tom Harley | 2020-02-26 02:33:42 +0000 |
| commit | 7808807313b33dee301b2eff5cb749147dd47ae0 (patch) | |
| tree | 618375061123c858c638416aa78f1583850f85af /ast.h | |
| download | sheets-7808807313b33dee301b2eff5cb749147dd47ae0.tar.gz sheets-7808807313b33dee301b2eff5cb749147dd47ae0.zip | |
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); |
