Lint.Declarations.node: def of bend-lint-api@0.2.0.0 Import: import bend-lint-api@0.2.0.0/linter/lint.bend as Lint Lines 722-745 of bend-lint-api@0.2.0.0/linter/lint.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&start_line=722&end_line=745 import Base import bend-lint-api@0.2.0.0/shared/lists.bend as Lists # A node's declaration, if it declares a name, with its uses, onto `out`. def Declarations.node( +uses: Uses, +node: Node, out: List<&2, Declaration> ) -> List<&2, Declaration>: match uses node: case Uses{sources, globals, binders, imported} Node{Import{t}, name, s, k, f}: Declaration{ node, Declarations.imported( String.is_empty(Declarations.namespace(sources, t, None{})), name, imported ) } <> out case _ _: Lists.onto( &2, Declaration, Declarations.declared(Syntax.declares(Node.syntax(node)), node, uses), out ) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Declaration https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Declarations.declared https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Declarations.imported https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Declarations.namespace https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Node.syntax https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Syntax https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Syntax.declares https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Uses https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/shared/lists.bend&name=onto