From d7fd7a190b885a85f170cdc55a3c6ad116a6c870 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 4 Mar 2017 19:28:48 -0800 Subject: 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. --- parser.y | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'parser.y') 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) { -- cgit v1.2.3