diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-03-20 22:39:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-03-20 22:39:18 -0700 |
commit | 6afa38a542e99165defe54e5d303abb51c65167c (patch) | |
tree | 6167c85e3c9a752cd91094c08cd74b37eab2a155 /stdlib/param.tl | |
parent | 6cdcff2307016b9f828d3101dc7302729a99b948 (diff) | |
download | txr-6afa38a542e99165defe54e5d303abb51c65167c.tar.gz txr-6afa38a542e99165defe54e5d303abb51c65167c.tar.bz2 txr-6afa38a542e99165defe54e5d303abb51c65167c.zip |
compiler: source-loc propagation in tree-bind, lambda
Unused variables in tree-bind forms are not generating
diagnostics with source location info. We are missing
some rlcp calls.
* stdlib/compiler.tl (compiler comp-catch): The generated
lambda here ends up transformed to a let by the
lambda-apply-transfom function. We must propagate source
info to it, otherwise unused catch clause parameters
get diagnosed without it.
(compiler (comp-for, comp-mac-param-bind,
comp-mac-env-param-bind, comp-tree-case): Confer source
location info onto the err-form argument of
expand-bind-mac-params.
(expand-bind-mac-params): Pass source location info
from err-form onto the generated let* form.
Thus, diagnostics related to variables in that let*
get reported against that form's location.
(lambda-apply-transform): Pass source location info
from the lambda expression to the generated let.
* stdlib/except.tl (usr:catch): Pass source loc info
from each clause source code to the transformed
clause. The transformed clause will turn into a lambda
which will turn into a let in comp-catch, and then
into a let in lambda-apply-transform.
Diffstat (limited to 'stdlib/param.tl')
0 files changed, 0 insertions, 0 deletions