diff options
| author | Felix Perktold <Felix.Perktold@student.uibk.ac.at> | 2025-12-21 14:01:36 +0100 |
|---|---|---|
| committer | Felix Perktold <Felix.Perktold@student.uibk.ac.at> | 2025-12-21 14:01:36 +0100 |
| commit | 4f025b96cfe6bc121ea9b37eb26d8814dd838647 (patch) | |
| tree | 50a034fe08d59d52a6c90fee19d1179a76736221 /lisp.h | |
| parent | e3b757ab811e82f8e1022b0bba0be5f3c328f8b7 (diff) | |
start implementing eval
Diffstat (limited to 'lisp.h')
| -rw-r--r-- | lisp.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |
