diff options
| author | Tom Harley | 2019-12-23 01:32:39 +0000 |
|---|---|---|
| committer | Tom Harley | 2019-12-23 01:32:39 +0000 |
| commit | 7bc67b95161a34f8eca635d4000d9602508a9243 (patch) | |
| tree | 585b3778dc1967832390e5829e4b3909b4184a2c /basic.h | |
| parent | Add basics for interpreter; add CLI options (diff) | |
| download | sinter-7bc67b95161a34f8eca635d4000d9602508a9243.tar.gz sinter-7bc67b95161a34f8eca635d4000d9602508a9243.zip | |
checkpoint
Diffstat (limited to 'basic.h')
| -rw-r--r-- | basic.h | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/basic.h b/basic.h deleted file mode 100644 index 13c375d..0000000 --- a/basic.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef BASIC_H -#define BASIC_H - -/* - * This struct being padded is unimportant. - */ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpadded" - -typedef struct sexpr { - int type; - union contents { - double f; - char *s; - int i; - struct node { - struct sexpr *l; - struct sexpr *r; - } n; - } contents; -} sexpr; - -#pragma clang diagnostic pop - -typedef struct node node; -typedef union contents contents; - -sexpr *new_int(int num); -sexpr *new_float(double num); -sexpr *new_id(char *id); -sexpr *new_node(sexpr *l, sexpr *r); -sexpr *new_str(char *str); - -void print_sexpr(sexpr *se); -void fprint_sexpr(FILE *f, sexpr *se); - -void codegen(sexpr *sexpr); - -#endif /* BASIC_H */ |
