diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-10 23:25:56 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-02-20 11:16:50 -0800 |
commit | 92cdc0cf0e80c1ff3f31cce20fc2b9bda86e3638 (patch) | |
tree | 2480c8bc3baba89873aea4061796a91522a7f5fb /src/lisp/ao_lisp.h | |
parent | fb710f7f4f24f74ac3d45fcc423803384d986bb2 (diff) |
altos/lisp: Make read() return eof atom on end of file
Also make it an exception to hit eof in the middle of an sexpr.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp.h')
-rw-r--r-- | src/lisp/ao_lisp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp.h b/src/lisp/ao_lisp.h index d265ea7b..6122a2ed 100644 --- a/src/lisp/ao_lisp.h +++ b/src/lisp/ao_lisp.h @@ -42,6 +42,7 @@ extern uint8_t ao_lisp_const[AO_LISP_POOL_CONST]; #define _ao_lisp_atom_delay _atom("delay") #define _ao_lisp_atom_eval _atom("eval") #define _ao_lisp_atom_read _atom("read") +#define _ao_lisp_atom_eof _atom("eof") #else #include "ao_lisp_const.h" #ifndef AO_LISP_POOL @@ -76,6 +77,7 @@ extern uint16_t ao_lisp_top; #define AO_LISP_DIVIDE_BY_ZERO 0x02 #define AO_LISP_INVALID 0x04 #define AO_LISP_UNDEFINED 0x08 +#define AO_LISP_EOF 0x10 extern uint8_t ao_lisp_exception; |