def dirs.done

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

import yaml-for-bend@0.1.1.0/parse.bend as Parse
import Base

363# After the directives, "---" must start the document.
364def dirs.done(d: Dirs, +ps: Ps) -> PStep:
365  match d:
366    case DirsBad{e}:
367      PStop{ps, Some{e}}
368    case Dirs{+toks, user}:
369      when(PStep, head.is(toks, DOC_START()),
370        u => PGo{goto(push(emit(take(with.tags(toks.with(ps, toks), List.append(&2, Prefix, user, defaults()))), DocStartEv{True{}}, head.start(toks)), SDocEnd{}), SDocContent{})},
371        u => fail(ps, "did not find expected <document start>", head.start(toks)))

Uses (21)

Used by (1)