summaryrefslogtreecommitdiffstats
path: root/autoload.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-06-28 01:03:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-06-28 01:03:51 -0700
commitd1ecf1d92d8162bc37b17b7050199a2a41b676c7 (patch)
treef6e4dff885e1c9c24ea6ecf15ca96caa56d3f0a8 /autoload.c
parentfb3de91f6a24e32641a017c3f49ebb3e93bb1ddc (diff)
downloadtxr-d1ecf1d92d8162bc37b17b7050199a2a41b676c7.tar.gz
txr-d1ecf1d92d8162bc37b17b7050199a2a41b676c7.tar.bz2
txr-d1ecf1d92d8162bc37b17b7050199a2a41b676c7.zip
match: new @(scan-all) operator.
This is like @(scan) but collects all matches over the suffixes of the list. * autoload.c (match_set_entries): Intern scan-all symbol. * stdlib/match.tl (compile-scan-all-match): New function. (compile-match): Dispatch compile-scan-all-match on scan-all symbol. * tests/011/patmatch.tl: Tests for scanall and also missing tests for scan. * txr.1: Documented.
Diffstat (limited to 'autoload.c')
-rw-r--r--autoload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload.c b/autoload.c
index f9e50a2c..032bd7fb 100644
--- a/autoload.c
+++ b/autoload.c
@@ -840,7 +840,8 @@ static val quips_instantiate(void)
static val match_set_entries(val fun)
{
val name_noload[] = {
- lit("all*"), lit("as"), lit("with"), lit("scan"), lit("sme"),
+ lit("all*"), lit("as"), lit("with"), lit("scan"), lit("scan-all"),
+ lit("sme"),
nil
};
val name[] = {