def h.fseq.entry

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

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

519def h.fseq.entry(+m: T.Mark, +first: Bool, +t: T.Token, +ps: Ps) -> PStep:
520  when(PStep, tok.is(t, FSEQ_END()), u => PGo{take(emit(pop(ps), SeqEndEv{}, tok.start(t)))},
521    u => when(PStep, Bool.not(first),
522      u => when(PStep, tok.is(t, FENTRY()), u => PGo{take(goto(ps, SFSeqEntry{m, True{}}))},
523        u => fail(ps, "did not find expected ',' or ']' while parsing a flow sequence", m)),
524      u => when(PStep, tok.is(t, KEY()), u => PGo{take(emit(goto(ps, SFSeqMapKey{m}), MapStartEv{None{}, NoTag{}, True{}}, tok.start(t)))},
525        u => when(PStep, tok.is(t, VALUE()), u => PGo{emit(goto(ps, SFSeqMapKey{m}), MapStartEv{None{}, NoTag{}, True{}}, tok.start(t))},
526          u => node.next(False{}, False{}, SFSeqEntry{m, False{}}, t, ps)))))

Uses (23)

Used by (1)