def h.fmap.key
yaml-for-bend@0.1.1.0 · parse.bend:545
import yaml-for-bend@0.1.1.0/parse.bend as Parse
import Base
import yaml-for-bend@0.1.1.0/token.bend as T
545def h.fmap.key(+m: T.Mark, +first: Bool, +t: T.Token, +ps: Ps) -> PStep:
546 when(PStep, tok.is(t, FMAP_END()), u => PGo{take(emit(pop(ps), MapEndEv{}, tok.start(t)))},
547 u => when(PStep, Bool.not(first),
548 u => when(PStep, tok.is(t, FENTRY()), u => PGo{take(goto(ps, SFMapKey{m, True{}}))},
549 u => fail(ps, "did not find expected ',' or '}' while parsing a flow mapping", m)),
550 u => when(PStep, tok.is(t, KEY()), u => PGo{take(goto(ps, SFMapAfterKey{m, tok.end(t)}))},
551 u => when(PStep, tok.is(t, VALUE()), u => PGo{empty(goto(ps, SFMapValue{m}), tok.start(t))},
552 u => node.next(False{}, False{}, SFMapEmpty{m}, t, ps)))))