diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-02 14:18:54 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-11-17 22:18:39 -0800 |
commit | d134a38c57429070ee5d4f74dafca4489e4b1443 (patch) | |
tree | f95eb5c657849f0831f0b4695c7dfe674422c453 /src/lisp/ao_lisp.h | |
parent | d92f8ca0d279ce6968bafefe4cd265e80e55123f (diff) |
altos/lisp: add set/setq and ' in reader
Along with other small fixes
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp.h')
-rw-r--r-- | src/lisp/ao_lisp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp.h b/src/lisp/ao_lisp.h index 4fac861b..d4108662 100644 --- a/src/lisp/ao_lisp.h +++ b/src/lisp/ao_lisp.h @@ -27,6 +27,7 @@ #ifdef AO_LISP_MAKE_CONST #define AO_LISP_POOL_CONST 16384 extern uint8_t ao_lisp_const[AO_LISP_POOL_CONST]; +#define _ao_lisp_atom_quote ao_lisp_atom_poly(ao_lisp_atom_intern("quote")) #else #include "ao_lisp_const.h" #endif @@ -62,6 +63,11 @@ extern uint8_t ao_lisp_exception; typedef uint16_t ao_poly; +static inline int +ao_lisp_is_const(ao_poly poly) { + return poly & AO_LISP_CONST; +} + static inline void * ao_lisp_ref(ao_poly poly) { if (poly == AO_LISP_NIL) @@ -128,6 +134,8 @@ enum ao_lisp_builtin_id { builtin_cdr, builtin_cons, builtin_quote, + builtin_set, + builtin_setq, builtin_print, builtin_plus, builtin_minus, |