Expand description
The symbol lens’s model: the names on one diff line, how far each one reaches, and every use of them on a line the diff shows. A local name reaches as far as its enclosing function; a function, method or type (a definition, a call or a type position) reaches across every file of the diff. The names come from the parse tree, so only the identifiers of the code count.
Structs§
- Lens
Data - A built lens: the line it was opened on, its names, and their uses.
- Lens
File - One file of the diff, as the worker reads it: both sides’ text and the line numbers the diff shows on each, a deleted line on the old side and an added or context line on the new one, so a context line counts once.
- Lens
Origin - The diff line the lens was opened on.
- Lens
Symbol - LensUse
- One use of a symbol on a line the diff shows.
Enums§
- Reach
- How far a symbol’s uses are looked for.
Constants§
- MAX_
SYMBOLS - The most names one line’s lens labels, one per digit key.
Functions§
- compute
- Build the lens for
originoverfiles. It parses both sides of every file, so it belongs on a worker thread. - lens_
files - The files of
modelascomputereads them.