aboutsummaryrefslogtreecommitdiff
path: root/src/interp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp.h')
-rw-r--r--src/interp.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/interp.h b/src/interp.h
index 5d408e8..221eb19 100644
--- a/src/interp.h
+++ b/src/interp.h
@@ -39,18 +39,22 @@ void Interp_free(Interp *self);
SExp* Interp_ref(Interp *self, SExpRef ref);
void Interp_gc(Interp *self, SExpRef tmp_root);
void Interp_add_primitive(Interp *self, const char *name, LispPrimitive fn);
+void Interp_add_userfunc(Interp *self, const char *name, LispUserFunc fn);
+SExpRef primitive_if(Interp *interp, SExpRef sexp);
SExpRef primitive_cond(Interp *interp, SExpRef sexp);
-SExpRef primitive_list(Interp *interp, SExpRef sexp);
SExpRef primitive_progn(Interp *interp, SExpRef sexp);
SExpRef primitive_setq(Interp *interp, SExpRef sexp);
SExpRef primitive_let(Interp *interp, SExpRef sexp);
-SExpRef primitive_car(Interp *interp, SExpRef sexp);
-SExpRef primitive_cdr(Interp *interp, SExpRef sexp);
-SExpRef primitive_cons(Interp *interp, SExpRef sexp);
-SExpRef primitive_add(Interp *interp, SExpRef sexp);
-SExpRef primitive_sub(Interp *interp, SExpRef sexp);
+SExpRef userfunc_list(Interp *interp, SExpRef sexp);
+SExpRef userfunc_car(Interp *interp, SExpRef sexp);
+SExpRef userfunc_cdr(Interp *interp, SExpRef sexp);
+SExpRef userfunc_cons(Interp *interp, SExpRef sexp);
+SExpRef userfunc_add(Interp *interp, SExpRef sexp);
+SExpRef userfunc_sub(Interp *interp, SExpRef sexp);
+
+void lisp_defun(Interp *interp, const char *name, SExpRef val);
void lisp_print(Interp *interp, SExpRef obj, FILE *fp);
SExpRef lisp_lookup(Interp *interp, const char *name);
SExpRef lisp_lookup_func(Interp *interp, const char *name);
@@ -76,6 +80,7 @@ SExpRef new_string(Interp *ctx, const char *val);
SExpRef new_symbol(Interp *ctx, const char *val);
SExpRef new_env(Interp *ctx);
SExpRef new_binding(Interp *ctx, SExpRef name, SExpRef val);
+SExpRef new_userfunc(Interp *interp, LispUserFunc val);
SExpRef new_list1(Interp *ctx, SExpRef e1);
SExpRef new_list2(Interp *ctx, SExpRef e1, SExpRef e2);
SExpRef new_list3(Interp *ctx, SExpRef e1, SExpRef e2, SExpRef e3);