From b94627b33d055c0d644480c9100d19c6318ed9c1 Mon Sep 17 00:00:00 2001 From: rodri Date: Sat, 31 Aug 2024 16:07:55 +0000 Subject: stage 4 (incomplete). --- s4/dat.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 s4/dat.h (limited to 's4/dat.h') diff --git a/s4/dat.h b/s4/dat.h new file mode 100644 index 0000000..9cdb6c7 --- /dev/null +++ b/s4/dat.h @@ -0,0 +1,23 @@ +typedef struct Symbol Symbol; +typedef struct Const Const; +typedef struct Builtin Builtin; + +struct Symbol { + char *name; + int type; + union { + double val; + double (*fn)(double); + } u; + Symbol *next; +}; + +struct Const { + char *name; + double val; +}; + +struct Builtin { + char *name; + double (*fn)(); +}; -- cgit v1.2.3