diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-02-20 22:07:15 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-02-20 22:07:15 -0800 |
commit | 87ed1d2ba09c793742e002d6d91466e4d89d36c1 (patch) | |
tree | 78b5dc985fe9b40cb2e0a5046df07152d1b1a2c6 | |
parent | 124e7dd6977a0853d7a8399921e31fd1ccde2dcb (diff) | |
download | txr-87ed1d2ba09c793742e002d6d91466e4d89d36c1.tar.gz txr-87ed1d2ba09c793742e002d6d91466e4d89d36c1.tar.bz2 txr-87ed1d2ba09c793742e002d6d91466e4d89d36c1.zip |
* parser.y (unquotes_occur): Bugfix: we should not terminate
the recursion early if we see a quote. This would be true if
the only quotes were those generated by the parser based on
calls to choose_quote. However, it breaks for something
like an explicitly coded '(sys:quote ,form), which becomes
(sys:quote (sys:quote ,form)), leaving a dangling unquote.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | parser.y | 2 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,12 @@ +2014-02-20 Kaz Kylheku <kaz@kylheku.com> + + * parser.y (unquotes_occur): Bugfix: we should not terminate + the recursion early if we see a quote. This would be true if + the only quotes were those generated by the parser based on + calls to choose_quote. However, it breaks for something + like an explicitly coded '(sys:quote ,form), which becomes + (sys:quote (sys:quote ,form)), leaving a dangling unquote. + 2014-02-19 Kaz Kylheku <kaz@kylheku.com> * mpi-patches/faster-square-root (mp_sqrt): Bugfix: was computing square @@ -1106,8 +1106,6 @@ static val unquotes_occur(val quoted_form) val sym = car(quoted_form); if (sym == unquote_s || sym == splice_s) return t; - if (sym == quote_s) - return nil; return or2(unquotes_occur(sym), unquotes_occur(cdr(quoted_form))); } } |