diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-02-18 21:22:31 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-02-18 21:22:31 -0800 |
commit | 056107ff44d2ae75b7b7db98979d1a920a37d439 (patch) | |
tree | 28601fc6f1c40138c8648d9e80c4247929c54128 /match.c | |
parent | d14ddd48c53f3d9ec960782c75f657a627456d22 (diff) | |
download | txr-056107ff44d2ae75b7b7db98979d1a920a37d439.tar.gz txr-056107ff44d2ae75b7b7db98979d1a920a37d439.tar.bz2 txr-056107ff44d2ae75b7b7db98979d1a920a37d439.zip |
* match.c (extract_vars): If a brace var is actually an
expression, then recurse into the expression to find
variables. This allows us to do things like @{`@x`} inside
a @(repeat) or @(rep).
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1535,7 +1535,10 @@ static val extract_vars(val output_spec) if (consp(output_spec)) { val sym = first(output_spec); if (sym == var_s) { - list_collect (tai, second(output_spec)); + if (bindable(second(output_spec))) + list_collect (tai, second(output_spec)); + else + list_collect_nconc (tai, extract_vars(second(output_spec))); } else if (sym != expr_s) { for (; output_spec; output_spec = cdr(output_spec)) list_collect_nconc(tai, extract_vars(car(output_spec))); |