diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-01-23 20:32:04 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-01-23 20:32:04 -0800 |
commit | 912c3a22d2da23fcfbc9bb0decbe64b144ff011c (patch) | |
tree | e9002f23af40ce916ce247fc3c57ebda74e98add /tests | |
parent | 75abded71ecaf0f5d1d3257f436b2df9690bdc25 (diff) | |
download | txr-912c3a22d2da23fcfbc9bb0decbe64b144ff011c.tar.gz txr-912c3a22d2da23fcfbc9bb0decbe64b144ff011c.tar.bz2 txr-912c3a22d2da23fcfbc9bb0decbe64b144ff011c.zip |
matcher: bind some temporaries with let.
* share/txr/stdlib/match.tl (match-vars): New slots, pure-vars
and pure-var-exprs.
(match-vars lets): New method.
(compiled-match wrap-guards): Generate an alet that binds the
temporaries, and then does the assignments of the regular
variables.
(compile-vec-match, compile-cons-structure,
compile-hash-match, compile-range-match): Use the pure-vars
for match-guard temporaries that are bound and not assigned,
rather than vars.
(when-match, if-match): Use alet for obj-var.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions