def step.inside

bolt@1.27.0.0 · src/noqa.bend:79

import bolt@1.27.0.0/src/noqa.bend as Noqa
import Base

79# inside a code: a letter or digit extends it; a space, a comma or anything
80# else ends it, and a comma expects the next
81def step.inside(kk: Cls, +cc: Char, +buf: List<&2, Char>, +acc: List<&2, String>) -> Rd:
82  match kk:
83    case CSpace{}:
84      Rd{After{}, [], word(buf) <> acc}
85    case CComma{}:
86      Rd{Before{}, [], word(buf) <> acc}
87    case CCode{}:
88      Rd{Inside{}, cc <> buf, acc}
89    case COther{}:
90      Rd{Past{}, [], word(buf) <> acc}

Uses (7)

Used by (1)