def Parse.expect_char.s

bend-scanner@0.1.0.0 · parse.bend:44

import bend-scanner@0.1.0.0/parse.bend as Parse
import Base

44def Parse.expect_char.s(
45  s: String, off: Nat, +want: Char
46) -> Result<&2, &2, Parse.Error, Parse.Cur>:
47  match s:
48    case SNil{}:
49      Fail{Eof{off}}
50    case SCon{+h, t}:
51      Parse.expect_char.eq(t, off, h, Char.is_eq(h, want))

Uses (8)

Used by (1)