def span_word

cswap-bend-cli@0.1.0.0 · json/lex.bend:57

import cswap-bend-cli@0.1.0.0/json/lex.bend as Lex
import Base

57# Leading run of word characters.
58def span_word(s: String, ok: Bool) -> Nat:
59  match s ok:
60    case SCon{c, +t} True{}:
61      1n+span_word(t, head_word(t))
62    case _ _:
63      0n

Uses (4)

Used by (2)