on 492ae2f help sign in
45 lines 785 B history raw
1### `++slav`
3Demand: parse span with input odor
5Parses a span `txt` to an atom of the odor specificed by `mod`. Crashes
6if it failes to parse.
8Accepts
9-------
11Produces
12--------
14`mod` is a term, an atom of odor `@tas`.
16`txt` is a span, an atom of odor `@ta`.
18Source
19------
21 ++ slav |=([mod/@tas txt/@ta] (need (slaw mod txt)))
23Examples
24--------
26 ~zod/try=> `@p`(slav %p '~pillyt')
27 ~pillyt
28 ~zod/try=> `@p`(slav %p '~pillam')
29 ! exit
30 ~zod/try=> `@ux`(slav %ux '0x12')
31 0x12
32 ~zod/try=> `@ux`(slav %ux '0b10')
33 ! exit
34 ~zod/try=> `@if`(slav %if '.127.0.0.1')
35 .127.0.0.1
36 ~zod/try=> `@if`(slav %if '.fe80.0.0.202')
37 ! exit
38 ~zod/try=> `@ta`(slav %ta '~.asd_a')
39 ~.asd_a
40 ~zod/try=> `@ta`(slav %ta '~~asd-a')
41 ! exit
45***