diff options
| author | Keith Packard <keithp@keithp.com> | 2016-11-02 14:18:54 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-02-20 11:16:49 -0800 | 
| commit | 9e1a787f8828fb7b750ad3310c89a89536ea5286 (patch) | |
| tree | f39297fc7f73c9c391b0c6bd4e93d8ddcb675d95 /src/lisp/ao_lisp.h | |
| parent | 8362393a621ea78a96e7f65f602f4bfc7bbd1158 (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, | 
