summaryrefslogtreecommitdiff
path: root/src/lisp/ao_lisp_make_const.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-11-10 11:30:55 -0800
committerKeith Packard <keithp@keithp.com>2016-11-17 22:18:39 -0800
commitfd7df330470c7c2f12ca3ce28d920c3b278108d5 (patch)
tree5dd18087ba3f8ab38790ad88eedce3334d276652 /src/lisp/ao_lisp_make_const.c
parenta3535e28a74055c3b303dbb4111cb3d38c2817e2 (diff)
altos/lisp: add progn, while, read and eval
Progn as a builtin will help with tail-recursion. while provides for loops until tail-recursion works :-) read and eval are kinda useful. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_make_const.c')
-rw-r--r--src/lisp/ao_lisp_make_const.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp_make_const.c b/src/lisp/ao_lisp_make_const.c
index 6f852f9d..bb4afbfb 100644
--- a/src/lisp/ao_lisp_make_const.c
+++ b/src/lisp/ao_lisp_make_const.c
@@ -33,6 +33,8 @@ struct builtin_func {
};
struct builtin_func funcs[] = {
+ "eval", AO_LISP_FUNC_LAMBDA, builtin_eval,
+ "read", AO_LISP_FUNC_LAMBDA, builtin_read,
"lambda", AO_LISP_FUNC_NLAMBDA, builtin_lambda,
"lexpr", AO_LISP_FUNC_NLAMBDA, builtin_lexpr,
"nlambda", AO_LISP_FUNC_NLAMBDA, builtin_nlambda,
@@ -45,6 +47,8 @@ struct builtin_func funcs[] = {
"set", AO_LISP_FUNC_LAMBDA, builtin_set,
"setq", AO_LISP_FUNC_MACRO, builtin_setq,
"cond", AO_LISP_FUNC_NLAMBDA, builtin_cond,
+ "progn", AO_LISP_FUNC_NLAMBDA, builtin_progn,
+ "while", AO_LISP_FUNC_NLAMBDA, builtin_while,
"print", AO_LISP_FUNC_LEXPR, builtin_print,
"patom", AO_LISP_FUNC_LEXPR, builtin_patom,
"+", AO_LISP_FUNC_LEXPR, builtin_plus,