From 7bc67b95161a34f8eca635d4000d9602508a9243 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Mon, 23 Dec 2019 01:32:39 +0000 Subject: checkpoint --- sinter.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sinter.h (limited to 'sinter.h') diff --git a/sinter.h b/sinter.h new file mode 100644 index 0000000..0288887 --- /dev/null +++ b/sinter.h @@ -0,0 +1,31 @@ +#ifndef SINTER_H +#define SINTER_H + +#include + +#include "sexpr.h" +#include "parse.h" + +typedef enum { + BITCODE, + LLVM_INTERMEDIATE, + INTERPRET, + GRAPHVIZ, + SINTER +} format_t; + +typedef struct node node; +typedef union contents contents; + +sexpr *new_int(int num, lloc_t lloc); +sexpr *new_float(double num, lloc_t lloc); +sexpr *new_id(char *id, lloc_t lloc); +sexpr *new_node(sexpr *l, sexpr *r, lloc_t lloc); +sexpr *new_str(char *str, lloc_t lloc); + +void print_sexpr(sexpr *se); +void fprint_sexpr(FILE *f, sexpr *se); + +void handle(sexpr *se); + +#endif /* SINTER_H */ -- cgit v1.2.1