def tag.resolve

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

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

302# A written tag's full name, through the document's %TAG prefixes.
303def tag.resolve(w: Maybe<&2, Written>, ts: List<&2, Prefix>, at: T.Mark) -> Result<&2, &2, T.Error, Tag>:
304  match w:
305    case None{}:
306      Done{NoTag{}}
307    case Some{x}:
308      match x:
309        case Written{+handle, +suffix}:
310          when(Result<&2, &2, T.Error, Tag>, String.is_empty(handle), u => Done{Tag{suffix}},
311            u => tag.found(prefix.find(ts, handle), suffix, at))

Uses (12)

Used by (1)