def is_merge

yaml-for-bend@0.1.1.0 · compose.bend:281

import yaml-for-bend@0.1.1.0/compose.bend as Compose
import Base
import yaml-for-bend@0.1.1.0/parse.bend as P
import yaml-for-bend@0.1.1.0/core.bend as C

281# Whether a scalar is YAML 1.1's merge key: "<<" plain, or tagged !!merge.
282def is_merge(s: Schema, t: P.Tag, +text: String, +plain: Bool) -> Bool:
283  match s:
284    case Core{}:
285      False{}
286    case Yaml11{}:
287      match t:
288        case P.NoTag{}:
289          Bool.and(plain, String.eq(text, "<<"))
290        case P.Tag{n}:
291          String.eq(n, C.yaml.tag("merge"))

Uses (7)

Used by (1)