From ee4298a2cfbbd9e015cfc775d9d714a9f5035846 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Wed, 30 Jun 2021 14:04:15 +0000 Subject: Add a basic repl --- dat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'dat.h') diff --git a/dat.h b/dat.h index e4ddc74..d5dbfef 100644 --- a/dat.h +++ b/dat.h @@ -1,4 +1,6 @@ typedef struct Term Term; +typedef struct Binding Binding; + struct Term { int tag; @@ -13,6 +15,14 @@ struct Term uvlong clausenr; }; +struct Binding +{ + Rune *name; + uvlong nr; /* Unique number for each clause. Every time a clause is used, it gets a new number. */ + Term *value; + Binding *next; +}; + enum { CompoundTerm, AtomTerm, -- cgit v1.2.3