def Program.defs

bend-lint-api@0.2.0.0 · linter/lint.bend:971

import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import Base
import bend-lint-api@0.2.0.0/shared/names.bend as Names

971# The definitions of the program's files, by the name the check gives them, onto `out`: read one with `Names.find`.
972def Program.defs(
973  sources: List<&2, Source>,
974  out: Map<&2, Maybe<&2, Def>>
975) -> Map<&2, Maybe<&2, Def>>:
976  match sources:
977    case Nil{}:
978      out
979    case Con{Source{path, namespace, text, nodes}, rest}:
980      Program.defs(rest, Program.defs.file(nodes, out))

Uses (6)

Used by (5)