summaryrefslogtreecommitdiffstats
path: root/HACKING-toc.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-04 21:59:46 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-11-04 21:59:46 -0700
commit157fd76ee20125f409929b95b768b931268b43cf (patch)
treee0d7fac96775010f206896c603d8363c654cbe81 /HACKING-toc.txr
parente122eb60bcf9188535d42d83e472b64c90b447b4 (diff)
downloadtxr-157fd76ee20125f409929b95b768b931268b43cf.tar.gz
txr-157fd76ee20125f409929b95b768b931268b43cf.tar.bz2
txr-157fd76ee20125f409929b95b768b931268b43cf.zip
Fix broken tracking of place expansion origins.
This change actually achieves the original intent that forms generated by place expansion register the place as their macro-expansion origin, enabling clearer diagnostics when things go wrong in that generated code. * share/txr/stdlib/place.tl (sys:cp-origin): Drop the syms argument; it's useless because we want to walk over the fully expanded to-tree in which those syms (denoting the names of local macros) will no longer appear. Now instead we find any conses in to-tree which already have macro ancestors. We trace the ancestor chain to the end and install the place form as the grand-ancestor, to express that all the expansion ultimately is derived from the place that is being manipulated. (call-update-expander, call-clobber-expander, call-delete-expander): After calling the expander, fully expand whatever it returns in the given environment. Then, propagate place as the macro origin throughout the forms contained in the expansion before returning it.
Diffstat (limited to 'HACKING-toc.txr')
0 files changed, 0 insertions, 0 deletions