def copy.hit.go

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

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

943# one character of a string that is being decoded
944def copy.hit.go(
945  +ch: Char,
946  +tl: String,
947  buf: List<&2, Char>,
948  stack: List<&2, Frame>,
949  goal: Goal,
950  done: Bool,
951  cls: Lex.Class,
952  ctrl: Bool
953) -> St:
954  match cls ctrl:
955    case Lex.CQuote{} c:
956      str.place(POwn{Lex.text(buf)}, tl, stack, goal)
957    case Lex.CBack{} False{}:
958      S{MEsc{buf}, stack, goal, done, False{}}
959    case k True{}:
960      err.st(goal)
961    case k False{}:
962      S{MCopy{ch <> buf}, stack, goal, done, False{}}

Uses (13)

Used by (1)