summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-08-02 20:10:32 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-08-02 20:10:32 -0700
commitd6ba8dd31733e6f3b455a8f746087b33066fef81 (patch)
tree6aab700c5f67444443345072b7f93f35978669a3
parent1d9f2661a2f151b9b264dd696821730e2e6e3e46 (diff)
downloadtxr-d6ba8dd31733e6f3b455a8f746087b33066fef81.tar.gz
txr-d6ba8dd31733e6f3b455a8f746087b33066fef81.tar.bz2
txr-d6ba8dd31733e6f3b455a8f746087b33066fef81.zip
Bugfix: (sys:expr . atom) bad syntax out of parser.
* parser.y (expand_meta): Fix incorrect conversion of (sys:var x) when x is a non-bindable term to (sys:expr . x). Should be (sys:expr x). This doesn't have that much of an impact, I don't think. It prevent certain degenerate forms from working like @(bind x @"str"). The bad thing is that this particular one has a silent problem: @"str" wrongly evaluates to #\s. Neverheless, this doesn't seem worth the addition of a compat flag test; the odds of someone depending on @"str" producing #\s in some pattern language code see vanishingly low.
-rw-r--r--parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.y b/parser.y
index 0884e4aa..2746f9e9 100644
--- a/parser.y
+++ b/parser.y
@@ -1601,7 +1601,7 @@ val expand_meta(val form, val menv)
if (sym == var_s) {
val var_x = expand(second(form), menv);
if (!bindable(var_x))
- return rlcp(cons(expr_s, var_x), form);
+ return rlcp(cons(expr_s, cons(var_x, nil)), form);
return rlcp(cons(var_s, cons(var_x, nil)), form);
}