def h.bmap.key

yaml-for-bend@0.1.1.0 · parse.bend:498

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

498def h.bmap.key(+m: T.Mark, +t: T.Token, +ps: Ps) -> PStep:
499  when(PStep, tok.is(t, KEY()), u => PGo{take(goto(ps, SBMapAfterKey{m, tok.end(t)}))},
500    u => when(PStep, tok.is(t, BEND()), u => PGo{take(emit(pop(ps), MapEndEv{}, tok.start(t)))},
501      u => when(PStep, tok.is(t, VALUE()), u => PGo{empty(goto(ps, SBMapValue{m}), tok.start(t))},
502        u => fail(ps, "did not find expected key while parsing a block mapping", m))))

Uses (19)

Used by (1)