def span.esc

emerging-ezjson@1.3.0.0 · src/pull.bend:867

import emerging-ezjson@1.3.0.0/src/pull.bend as Pull
import Base

867# a backslash in a span: copy the prefix, or drop it when skipping
868def span.esc(
869  +cut: String,
870  +nn: U32,
871  stack: List<&2, Frame>,
872  goal: Goal,
873  done: Bool
874) -> St:
875  match goal:
876    case GNext{}:
877      S{MEsc{copy.rev(cut, nn, U32.is_zero(nn), [])}, stack, goal, done, False{}}
878    case GSkip{depth}:
879      S{MSkEsc{}, stack, goal, done, False{}}

Uses (10)

Used by (2)