diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-02-17 20:24:35 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-02-17 20:24:35 -0800 |
commit | f1bcb15c4979b9af3823223854fe16bfe155b2fe (patch) | |
tree | 06876e383ffff77ed1542af15e1d30d675875510 /eval.c | |
parent | b76485e540762c60ba34dc36875c3b936f4df7b8 (diff) | |
download | txr-f1bcb15c4979b9af3823223854fe16bfe155b2fe.tar.gz txr-f1bcb15c4979b9af3823223854fe16bfe155b2fe.tar.bz2 txr-f1bcb15c4979b9af3823223854fe16bfe155b2fe.zip |
* eval.c (expand): Bugfix: do not expand any part of the macro
form via expand_forms. This is completely wrong since only the
macro knows what material is evaluated and what isn't.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -2188,10 +2188,7 @@ tail: val result = eval_progn(args_ex, make_env(nil, nil, nil), args); return cons(quote_s, cons(result, nil)); } else if ((macro = gethash(top_mb, sym))) { - val args = rest(form); - val args_ex = expand_forms(args); - val form_ex = if3(args_ex == args, form, cons(sym, args_ex)); - val mac_expand = expand_macro(form_ex, macro, make_env(nil, nil, nil)); + val mac_expand = expand_macro(form, macro, make_env(nil, nil, nil)); if (mac_expand == form) return form; rlcp_tree(mac_expand, form); |