def esc.b.other

bend-kit-json@0.7.0.0 · json.bend:364

import bend-kit-json@0.7.0.0/json.bend as Json
import Base

364# §7: unescaped chars below U+0020 are not allowed in a string.
365def esc.b.other(ascii: Bool, +c: U32, a: Array<U32>, +len: U32, +i: U32, acc: W, key: Bool, stack: List<&1, Open>) -> Array<U32> & Sb:
366  match ascii:
367    case True{}:
368      (a, Bool.pick(Sb, U32.is_lt(c, 32), BFail{}, BEsc{(i + 1 : U32), w.put(acc, c), key, stack}))
369    case False{}:
370      esc.b.cp(acc, key, stack, i, utf8.at(a, len, i, c))

Uses (15)

Used by (1)