summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-03-04 19:28:48 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-03-04 19:28:48 -0800
commitd7fd7a190b885a85f170cdc55a3c6ad116a6c870 (patch)
treec39200336c20bf548e3b9f27321be2d97d1e9f5c /parser.y
parente38bf9d57d37d975adb24e298ee0fedfe6c6a599 (diff)
downloadtxr-d7fd7a190b885a85f170cdc55a3c6ad116a6c870.tar.gz
txr-d7fd7a190b885a85f170cdc55a3c6ad116a6c870.tar.bz2
txr-d7fd7a190b885a85f170cdc55a3c6ad116a6c870.zip
bugfix: :vars in output repeat not registered.
Test case: @(output) @ (repeat :vars (x (y 42)) @ (list x y) @ (end) @(end) x and y are spuriously reported as unbound variables in the (list x y) form. * parser.y (expand_repeat_rep_args): Do the missing calls to match_reg_var when processing :vars list.
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y10
1 files changed, 7 insertions, 3 deletions
diff --git a/parser.y b/parser.y
index 14bad936..bf87772e 100644
--- a/parser.y
+++ b/parser.y
@@ -1288,12 +1288,16 @@ static val expand_repeat_rep_args(val args)
list_collect_decl (iout, iptail);
for (; arg; arg = cdr(arg)) {
val iarg = car(arg);
- if (consp(iarg))
- iptail = list_collect(iptail, list(first(iarg),
+ if (consp(iarg)) {
+ val sym = first(iarg);
+ iptail = list_collect(iptail, list(sym,
expand(second(iarg), nil),
nao));
- else
+ match_reg_var(sym);
+ } else {
iptail = list_collect(iptail, iarg);
+ match_reg_var(iarg);
+ }
}
ptail = list_collect(ptail, iout);
} else if (exp_pair) {