diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-03-04 19:28:48 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-03-04 19:28:48 -0800 |
commit | d7fd7a190b885a85f170cdc55a3c6ad116a6c870 (patch) | |
tree | c39200336c20bf548e3b9f27321be2d97d1e9f5c | |
parent | e38bf9d57d37d975adb24e298ee0fedfe6c6a599 (diff) | |
download | txr-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.
-rw-r--r-- | parser.y | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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) { |