src/lsp/checker/names.bend checks
raw source on the hub · import 0x582b4b0fdf3dafdeecc8c3bfddc5e4db/src/lsp/checker/names.bend as Names
checker/names: pure. The names bend gives the items of the file it
checks, so a report's Location can be told apart as this file's or an
import's (report.bend's mine). bend keys a def by its name, and a def
whose name opens with an import alias (def Laws.x filling a law of
./LAWS.bend) by that import's namespace: its path, ./ and .bend
dropped (LAWS.x). A def of an import beside the file is keyed the same
way (m.g), which is why the file's own keys are needed at all.
3 imports
import Base import ../../syntax/outline.bend as Outline import ../../lazy/lazy.bend as Lazy
Definitions
def ns.lead source · line 13 · raw
@ss:String -> String
a path without its leading ./s
def ns source · line 21 · raw
@path:String -> String
an import's namespace: its path, without a leading ./ or its .bend
def key.of source · line 27 · raw
@alias:Maybe<&2, String> -> @+name:String -> @+rest:String -> String
the key of a name that opens with head.: through the import aliased head
when there is one, else the name as written
def key.parts source · line 35 · raw
@items:List<&2, 0x582b4b0fdf3dafdeecc8c3bfddc5e4db/src/syntax/outline.Item> -> @+name:String -> @parts:List<&2, String> -> String
an item's key, among the file's items
def key source · line 43 · raw
@items:List<&2, 0x582b4b0fdf3dafdeecc8c3bfddc5e4db/src/syntax/outline.Item> -> @+name:String -> String
an item's key: bend's name for it
def keys source · line 47 · raw
@its:List<&2, 0x582b4b0fdf3dafdeecc8c3bfddc5e4db/src/syntax/outline.Item> -> @+items:List<&2, 0x582b4b0fdf3dafdeecc8c3bfddc5e4db/src/syntax/outline.Item> -> @+acc:List<&2, String> -> List<&2, String>
the keys of the items, imports aside, onto acc (in no particular order)
def of source · line 55 · raw
@mm:Maybe<&2, String> -> Maybe<&2, List<&2, String>>
the names bend gives a file's items, when its text could be read