def low.with

yaml-for-bend@0.1.1.0 · scan.bend:491

import yaml-for-bend@0.1.1.0/scan.bend as Scan
import Base
import yaml-for-bend@0.1.1.0/token.bend as T

491# A level's low: the one below it, or its own key when that is possible.
492def low.with(below: Maybe<&2, T.Mark>, possible: Bool, at: T.Mark) -> Maybe<&2, T.Mark>:
493  match below:
494    case Some{m}:
495      Some{m}
496    case None{}:
497      match possible:
498        case True{}:
499          Some{at}
500        case False{}:
501          None{}

Uses (3)

Used by (2)