diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-01-15 07:39:10 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-01-15 07:39:10 -0800 |
commit | 2d9d10ad41490e7bb58cc74af357a52373c0ed5e (patch) | |
tree | d71910f007d4fb2ced19a9c981ee97c09cefd964 /txr.vim | |
parent | cb7e8aba2b75a419357fb33e235ecb86763177a2 (diff) | |
download | txr-2d9d10ad41490e7bb58cc74af357a52373c0ed5e.tar.gz txr-2d9d10ad41490e7bb58cc74af357a52373c0ed5e.tar.bz2 txr-2d9d10ad41490e7bb58cc74af357a52373c0ed5e.zip |
matcher: support @(some pat) operator.
This is the existential quantifier to accompany @(all).
* share/txr/stdlib/match.tl (compile-loop-match): Check for
the some symbol in a few places and adjust the output.
We don't need a local binding of the patter's variables,
only the temps. The values go directly to the outer binding of
the variables which are not shadowed now. We also don't need
the nreverse logic to set the outer variables: var-exprs
is nil at the outer level. The polarity of the loop
termination test is reversed: we quit the loop on the first
match, as is the polarity of the return value: if the loop is
aborted early t is returned instead of nil.
(compile-match): Wire in the some operator.
Diffstat (limited to 'txr.vim')
0 files changed, 0 insertions, 0 deletions