From d1ecf1d92d8162bc37b17b7050199a2a41b676c7 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 28 Jun 2024 01:03:51 -0700 Subject: 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. --- autoload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'autoload.c') 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[] = { -- cgit v1.2.3