def St.lex

bendtorch-load@1.3.0.0 · main.bend:318

import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad
import Base

318# the header's tokens, in order; r is what the previous byte left
319def St.lex(bs: List<&2, U32>, r: LexR, out: List<&2, Tok>) -> List<&2, Tok>:
320  match bs r:
321    case Nil{} LexR{st, ts}: List.reverse(&2, Tok, St.fin(st, St.push(ts, out)))
322    case Con{+b, t} LexR{st, ts}: St.lex(t, St.step(st, b), St.push(ts, out))

Uses (8)

Used by (1)