mes.c: bugfix for eval_quasiquote: stay in quasiquote mode after next quote.

This commit is contained in:
Jan Nieuwenhuizen 2016-07-17 09:06:48 +02:00
parent d21d4aecfc
commit 6baafb2380
2 changed files with 5 additions and 1 deletions

2
mes.c
View file

@ -1111,7 +1111,7 @@ eval_quasiquote (scm *e, scm *a)
if (e == &scm_nil) return e;
else if (atom_p (e) == &scm_t) return e;
else if (eq_p (car (e), &scm_symbol_quote) == &scm_t)
return e;
return cons (car (e), eval_quasiquote (cdr (e), a));
else if (eq_p (car (e), &scm_symbol_quasiquote) == &scm_t)
return cons (e, eval_quasiquote (cdr (e), a));
else if (eq_p (car (e), &scm_symbol_unquote) == &scm_t)

View file

@ -315,6 +315,10 @@
(display `(1 ,@s-r 4))
(newline)
(display "`(1 2 '(,(+ 1 2))): ")
(display `(1 2 '(,(+ 1 2))))
(newline)
(display "when:")
(when #t
(display "true")