summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-20 22:07:15 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-20 22:07:15 -0800
commit87ed1d2ba09c793742e002d6d91466e4d89d36c1 (patch)
tree78b5dc985fe9b40cb2e0a5046df07152d1b1a2c6
parent124e7dd6977a0853d7a8399921e31fd1ccde2dcb (diff)
downloadtxr-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--ChangeLog9
-rw-r--r--parser.y2
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fef5ab1a..eca751b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/parser.y b/parser.y
index a4a7aa61..4c402965 100644
--- a/parser.y
+++ b/parser.y
@@ -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)));
}
}