def content.none

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

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

415# No content: an empty scalar, when the node has an anchor or a tag.
416def content.none(+block: Bool, +props: Bool, anchor: Maybe<&2, String>, tag: Tag, +at: T.Mark, +ps: Ps) -> PStep:
417  when(PStep, props, u => PGo{emit(pop(ps), ScalarEv{anchor, tag, "", T.Plain{}}, at)},
418    u => fail(ps, Bool.pick(String, block, "did not find expected node content while parsing a block node",
419      "did not find expected node content while parsing a flow node"), at))

Uses (14)

Used by (1)