def Utf8.emit.go

bend-kube-runtime@0.2.0.0 · src/utf8.bend:92

import bend-kube-runtime@0.2.0.0/src/utf8.bend as Utf8
import Base

92# The chars byte b completes, pushed onto acc (reversed).
93def Utf8.emit.go(+code: U32, +need: U32, +b: U32, acc: String, cont: Bool, idle: Bool) -> String:
94  match cont idle:
95    case True{} False{}:
96      Utf8.emit.cont(((code << 6n) .|. (b .&. 63) : U32), acc, U32.is_eq(need, 1))
97    case False{} False{}:
98      Utf8.fresh.out(b, Utf8.lead(b), SCon{Utf8.bad(), acc},
99        U32.is_eq(Utf8.lead(b), 0), U32.is_eq(Utf8.lead(b), 4))
100    case _ _:
101      Utf8.fresh.out(b, Utf8.lead(b), acc, U32.is_eq(Utf8.lead(b), 0), U32.is_eq(Utf8.lead(b), 4))

Uses (11)

Used by (1)