def marker.go
bolt@1.27.0.0 · src/lsp/report.bend:43
import bolt@1.27.0.0/src/lsp/report.bend as Report
import Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
43
44
45def marker.go(ss: String, +whole: String, +count: Nat) -> Maybe<&2, U32>:
46 match ss:
47 case SNil{}:
48 None{}
49 case SCon{+hh, +tt}:
50 Lazy.stop(Maybe<&2, U32>, Bool.not(Char.is_digit(hh)),
51 Bool.pick(Maybe<&2, U32>, String.starts_with(SCon{hh, tt}, ">|"), U32.read(String.take(whole, count)), None{}),
52 _u => marker.go(tt, whole, 1n+count))