Expand description
Per-file memoized symbol table.
SymbolMap is a pre-computed HashMap<name, Vec<SymbolEntry>> built from
a parsed PHP file in one AST pass. Each entry stores the precise LSP Range
of the identifier, the declaration kind, whether it is abstract, a
pre-rendered hover signature, and a pre-extracted docblock (as markdown).
Because building the map is O(AST_size) but lookup is O(1), the payoff is
on the cross-file / other_docs path: a stable file (one that hasn’t changed
since the last keystroke) has its map served from the salsa cache rather than
re-walking its AST on every request. See crate::db::symbol_map for the
salsa query that drives this.
Structs§
- Symbol
Entry - A single resolved declaration stored in the pre-computed symbol map.
- Symbol
Map - Pre-computed symbol table for a single PHP file.
Enums§
- Symbol
Entry Kind - Which kind of PHP declaration this entry represents. Mirrors the variants of
Declarationso callers can reconstruct any accept predicate without an AST walk.
Functions§
- is_
abstract_ entry goto_declarationpass 1: abstract/interface declarations.- is_
any_ entry goto_declarationpass 2: any declaration except promoted params.- is_
definition_ entry goto_definition: skip enum constants (matching original walker).- is_
hoverable_ kind - Reconstruct the
is_hoverablepredicate from a storedSymbolEntryKind.