summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-23 20:56:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-23 20:56:36 -0700
commited16b6ad1030981253aa6e6575024df41318cf99 (patch)
tree180e191f2e4a4db7fd6edb4c6d45797f878fa421 /eval.c
parent7b577e8a23f522d51fef4c2f60edf1a25e2923a4 (diff)
downloadtxr-ed16b6ad1030981253aa6e6575024df41318cf99.tar.gz
txr-ed16b6ad1030981253aa6e6575024df41318cf99.tar.bz2
txr-ed16b6ad1030981253aa6e6575024df41318cf99.zip
Track origin across op/do expansion.
* eval.c (me_op): We tell a little lie here, by indicating that the "dwim body" is an expansion of the op operator. Of course, the entire lambda containing that body is that expansion. But in error messages, we need something useful for the user.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 92b54b52..f3dca033 100644
--- a/eval.c
+++ b/eval.c
@@ -2945,6 +2945,8 @@ static val me_op(val form, val menv)
if (sym == do_s)
dwim_body = rlcp(cdr(dwim_body), dwim_body);
+ set_origin(dwim_body, form);
+
return cons(lambda_s,
cons(append2(mapcar(cdr_f, ssyms), rest_gensym),
cons(dwim_body, nil)));