summaryrefslogtreecommitdiffstats
path: root/y.tab.c.shipped
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-08-02 18:25:14 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-08-02 18:25:14 -0700
commita81edc2c7f1a8110ccc77ef9c73a462af33565dd (patch)
tree76afea00f441c3fae2d8c2c116fda67254796174 /y.tab.c.shipped
parent9d2aa3c66fa52700b213b29ae52d9f08e67d0e2c (diff)
downloadtxr-a81edc2c7f1a8110ccc77ef9c73a462af33565dd.tar.gz
txr-a81edc2c7f1a8110ccc77ef9c73a462af33565dd.tar.bz2
txr-a81edc2c7f1a8110ccc77ef9c73a462af33565dd.zip
bug: :vars not usable with :counter in @(repeat).
This is a regression due to a March 2016 commit which introduced the ability for :vars in an output-side @(repeat) block to have initial values. The bug has the effect that all arguments in @(repeat) which are conses/lists get duplicated, which messes up the property list structure. * parser.y (expand_repeat_rep_args): Do not unconditionally add reg to the output at the bottom of the loop. A few cases above in the consp(arg) case handle that themselves, and do not continue the loop, so control ends up at the bottom, adding a spurious item. By removing this list_collect, we have to introduce it to just one case which relies on it. * tests/008/repeat.txr, * tests/008/repeat.expected: New files. * y.tab.c.shipped: Updated.
Diffstat (limited to 'y.tab.c.shipped')
-rw-r--r--y.tab.c.shipped2
1 files changed, 1 insertions, 1 deletions
diff --git a/y.tab.c.shipped b/y.tab.c.shipped
index 31da32e7..f1377d67 100644
--- a/y.tab.c.shipped
+++ b/y.tab.c.shipped
@@ -7351,10 +7351,10 @@ static val expand_repeat_rep_args(val args)
}
} else if (exp_pair) {
match_reg_var(arg);
+ ptail = list_collect(ptail, arg);
}
exp_pair = exp_pairs = nil;
- ptail = list_collect(ptail, arg);
}
return out;