on 492ae2f help sign in
39 lines 761 B history raw
1### `++star`
3List of matches
5Parser modifier: parse `++list` of matches.
7Accepts
8-------
10`fel` is a `++rule`.
12Produces
13--------
15 ++ star :: 0 or more times
16 |* fel/rule
17 (stir `(list _(wonk *fel))`~ |*({a/* b/*} [a b]) fel)
19Examples
20--------
22 ~zod/try=> (scan "aaaaa" (just 'a'))
23 ! {1 2}
24 ! 'syntax-error'
25 ! exit
26 ~zod/try=> (scan "aaaaa" (star (just 'a')))
27 "aaaaa"
28 ~zod/try=> (scan "abcdef" (star (just 'a')))
29 ! {1 2}
30 ! 'syntax-error'
31 ! exit
32 ~zod/try=> (scan "abcabc" (star (jest 'abc')))
33 <|abc abc|>
34 ~zod/try=> (scan "john smith" (star (shim 0 200)))
35 "john smith"
39***