def Parse.expect_literal.start

bend-scanner@0.1.0.0 · parse.bend:73

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

73def Parse.expect_literal.start(
74  s: String, p: String, off: Nat
75) -> Result<&2, &2, Parse.Error, Parse.Cur>:
76  match s p:
77    case _ SNil{}:
78      Done{Cur{s, off}}
79    case SNil{} SCon{_, _}:
80      Fail{Eof{off}}
81    case SCon{+h, t} SCon{ph, pt}:
82      Parse.expect_literal.go(t, pt, Char.is_eq(h, ph), h, off)

Uses (7)

Used by (1)