def import_path

bolt@1.27.0.0 · src/syntax/outline.bend:555

import bolt@1.27.0.0/src/syntax/outline.bend as Outline
import Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy

555# the path behind an import alias
556def import_path(items: List<&2, Item>, +alias: String) -> Maybe<&2, String>:
557  match items:
558    case Nil{}:
559      None{}
560    case Con{Item{k, nm, l, s, d, p}, t}:
561      Lazy.stop(Maybe<&2, String>, Bool.and(is_import(k), String.eq(nm, alias)),
562        Some{p}, _u => import_path(t, alias))

Uses (8)

Used by (4)