diff options
author | Keith Packard <keithp@keithp.com> | 2017-11-17 23:23:50 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-11-17 23:26:59 -0800 |
commit | cf5729a0bae51172f12fc9ec4339d4e975a45fcc (patch) | |
tree | f67bef57d31f5f202718f7e8dbc6f41ac6b6c346 /src/lisp/ao_lisp_rep.c | |
parent | e1acf5eb12aceda7aa838df031c1da1129d0fa5d (diff) |
altos/lisp: Finish first pass through r7rs
* print -> write, patom -> display
* Add read-char, write-char
* Add exit, current-jiffy, current-second, jiffies-per-second
* Add for-each and string-for-each
* Avoid duplicate builtins with different atoms
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_rep.c')
-rw-r--r-- | src/lisp/ao_lisp_rep.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lisp/ao_lisp_rep.c b/src/lisp/ao_lisp_rep.c index ef7dbaf2..43cc387f 100644 --- a/src/lisp/ao_lisp_rep.c +++ b/src/lisp/ao_lisp_rep.c @@ -24,9 +24,11 @@ ao_lisp_read_eval_print(void) break; out = ao_lisp_eval(in); if (ao_lisp_exception) { + if (ao_lisp_exception & AO_LISP_EXIT) + break; ao_lisp_exception = 0; } else { - ao_lisp_poly_print(out); + ao_lisp_poly_write(out); putchar ('\n'); } } |