def span.advance

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

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

881# the next state after one character of a span. The unread tail stays with
882# the stepper, so the usual character does not keep it
883def span.advance(
884  key: Skind,
885  cut: String,
886  nn: U32,
887  stack: List<&2, Frame>,
888  goal: Goal,
889  done: Bool
890) -> St:
891  match key:
892    case KGo{}:
893      S{MSpan{cut, U32.add(nn, 1)}, stack, goal, done, False{}}
894    case KEnd{}:
895      str.place.here(PSpan{cut, nn}, stack, goal)
896    case KEsc{}:
897      span.esc(cut, nn, stack, goal, done)
898    case KBad{}:
899      err.st(goal)

Uses (14)

Used by (1)