diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-01-09 15:23:46 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-01-09 15:23:46 -0800 |
commit | d8df8beb2e00517a546d753586d67e14ffa4611d (patch) | |
tree | f52a9dac50dd69e65f29d23ee966711f601be4f2 | |
parent | 2098cacb547ba399c879bd53fff8dd5b1408f81f (diff) | |
download | txr-d8df8beb2e00517a546d753586d67e14ffa4611d.tar.gz txr-d8df8beb2e00517a546d753586d67e14ffa4611d.tar.bz2 txr-d8df8beb2e00517a546d753586d67e14ffa4611d.zip |
* eval.c (subst_vars): Evaluate the
modifiers, so expressions can be used.
* match.c (subst_vars): Likewise,
but using txeval.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | match.c | 4 |
3 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,11 @@ +2012-01-09 Kaz Kylheku <kaz@kylheku.com> + + * eval.c (subst_vars): Evaluate the + modifiers, so expressions can be used. + + * match.c (subst_vars): Likewise, + but using txeval. + 2012-01-07 Kaz Kylheku <kaz@kylheku.com> Version 52 @@ -744,7 +744,7 @@ static val subst_vars(val forms, val env) if (sym == var_s) { val sym = second(form); val pat = third(form); - val modifiers = fourth(form); + val modifiers = eval_args(fourth(form), env, form); val pair = lookup_var(env, sym); if (pair) { @@ -1277,6 +1277,10 @@ static val subst_vars(val spec, val bindings, val filter) val modifiers = fourth(elem); val pair = assoc(sym, bindings); + if (modifiers) + modifiers = mapcar(curry_123_2(func_n3(txeval), spec, bindings), + modifiers); + if (pair) { val str = cdr(pair); |