def tokens.rev

emerging-ezjson@1.3.0.0 · src/lex.bend:314

import emerging-ezjson@1.3.0.0/src/lex.bend as Lex
import Base

314# the first n chars of src, reversed, for the escape fallback's buffer
315def tokens.rev(src: String, +nn: U32, zero: Bool, acc: List<&2, Char>) -> List<&2, Char>:
316  match src zero:
317    case s True{}:
318      acc
319    case SNil{} False{}:
320      acc
321    case SCon{h, t} False{}:
322      tokens.rev(t, U32.sub(nn, 1), U32.is_zero(U32.sub(nn, 1)), h <> acc)

Uses (7)

Used by (1)