diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | match.c | 5 |
2 files changed, 11 insertions, 1 deletions
@@ -1,5 +1,12 @@ 2012-02-18 Kaz Kylheku <kaz@kylheku.com> + * 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). + +2012-02-18 Kaz Kylheku <kaz@kylheku.com> + Allow braced output variables to actually be arbitrary substitutions. * eval.c (subst_vars): Treat the variable as an arbitrary @@ -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))); |