def targets
bolt@1.27.0.0 · src/rules/imports.bend:61
import bolt@1.27.0.0/src/rules/imports.bend as Imports
import Base
import bolt@1.27.0.0/src/syntax/outline.bend as Outline
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
61
62def targets(items: List<&2, Outline.Item>, +from: String) -> List<&2, String>:
63 match items:
64 case Nil{}:
65 Nil{}
66 case Con{Outline.Item{Outline.IImport{}, name, line, sig, doc, +path}, rest}:
67 +more = targets(rest, from)
68 Lazy.stop(List<&2, String>, Bool.not(String.starts_with(path, ".")), more, _u => resolve(from, path) <> more)
69 case Con{other, rest}:
70 targets(rest, from)