on beeb398 help sign in
30 lines 566 B history raw
1### `++bas`
3Parse backslash
5Parses ASCII character 92, the backslash. Note the extra `\` in the calling of
6`bas` with [`++just`](/doc/hoon/library/2ec#++just) is to escape the escape
7character, `\`.
9Source
10------
12 ++ bas (just '\\')
14Examples
15--------
17 ~zod/try=> (scan "\\" bas)
18 ~~~5c.
19 ~zod/try=> `cord`(scan "\\" bas)
20 '\'
21 ~zod/try=> (bas [[1 1] "\"])
22 ~ <syntax error at [1 18]>
23 ~zod/try=> (bas [[1 1] "\\"])
24 [p=[p=1 q=2] q=[~ [p=~~~5c. q=[p=[p=1 q=2] q=""]]]]
25 ~zod/try=> (bas [[1 1] "\""])
26 [p=[p=1 q=1] q=~]
30***