From 7bc67b95161a34f8eca635d4000d9602508a9243 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Mon, 23 Dec 2019 01:32:39 +0000 Subject: checkpoint --- basic.h | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 basic.h (limited to 'basic.h') 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 */ -- cgit v1.2.1