summaryrefslogtreecommitdiff
path: root/lisp.h
diff options
context:
space:
mode:
authorFelix Perktold <Felix.Perktold@student.uibk.ac.at>2025-12-21 14:01:36 +0100
committerFelix Perktold <Felix.Perktold@student.uibk.ac.at>2025-12-21 14:01:36 +0100
commit4f025b96cfe6bc121ea9b37eb26d8814dd838647 (patch)
tree50a034fe08d59d52a6c90fee19d1179a76736221 /lisp.h
parente3b757ab811e82f8e1022b0bba0be5f3c328f8b7 (diff)
start implementing eval
Diffstat (limited to 'lisp.h')
-rw-r--r--lisp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp.h b/lisp.h
index 4053bd5..6ebf9a2 100644
--- a/lisp.h
+++ b/lisp.h
@@ -31,6 +31,8 @@ value *make_symbol(const char *sym);
value *make_string(const char *str);
value *make_nil();
value *cons(value *car, value *cdr);
+value *car(value *cons);
+value *cdr(value *cons);
void *print_value(value *val);
// environments, TODO: make this use hashtable
@@ -47,4 +49,9 @@ env *env_create(env *parent);
env *env_define(env *e, const char *sym, value *val);
value *env_lookup(env *e, const char *sym);
+extern env *global_env;
+
+value *eval(env *e, value *val);
+value *eval_pair(env *e, value *val);
+
#endif