summaryrefslogtreecommitdiff
path: root/src/lisp/ao_lisp_builtin.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-12-03 19:54:18 -0800
committerKeith Packard <keithp@keithp.com>2017-12-03 19:54:18 -0800
commit9dbc686ad7d3289dc0f9bcf4a973f71100e02ded (patch)
treec64a5e1c981ef3fb6995d361f4b65c1aa8a0f51a /src/lisp/ao_lisp_builtin.c
parenta1d013ab8cc508d4e17ae8876bc5465d1a2dfc1e (diff)
altos/lisp: Switch to scheme formal syntax for varargs
Scheme uses bare symbols to indicate a varargs parameter; any bare (i.e., not wrapped in a cons cell) parameter will get the 'rest' of the parameter list. This works for lambdas, nlambdas and macros. As a result, the 'lexpr' form has been removed as it is equivalent to a lambda with a varargs formal. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_builtin.c')
-rw-r--r--src/lisp/ao_lisp_builtin.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/lisp/ao_lisp_builtin.c b/src/lisp/ao_lisp_builtin.c
index fdca0208..6af2a6ea 100644
--- a/src/lisp/ao_lisp_builtin.c
+++ b/src/lisp/ao_lisp_builtin.c
@@ -50,7 +50,6 @@ char *ao_lisp_args_name(uint8_t args) {
args &= AO_LISP_FUNC_MASK;
switch (args) {
case AO_LISP_FUNC_LAMBDA: return ao_lisp_poly_atom(_ao_lisp_atom_lambda)->name;
- case AO_LISP_FUNC_LEXPR: return ao_lisp_poly_atom(_ao_lisp_atom_lexpr)->name;
case AO_LISP_FUNC_NLAMBDA: return ao_lisp_poly_atom(_ao_lisp_atom_nlambda)->name;
case AO_LISP_FUNC_MACRO: return ao_lisp_poly_atom(_ao_lisp_atom_macro)->name;
default: return "???";
@@ -70,7 +69,6 @@ ao_lisp_builtin_name(enum ao_lisp_builtin_id b) {
static const ao_poly ao_lisp_args_atoms[] = {
[AO_LISP_FUNC_LAMBDA] = _ao_lisp_atom_lambda,
- [AO_LISP_FUNC_LEXPR] = _ao_lisp_atom_lexpr,
[AO_LISP_FUNC_NLAMBDA] = _ao_lisp_atom_nlambda,
[AO_LISP_FUNC_MACRO] = _ao_lisp_atom_macro,
};