perl-symbol
Unified Perl symbol model for the perl-lsp ecosystem: taxonomy, cursor
extraction, search indexing, and AST surface projection — all in a single
published crate.
Modules
| Module | Purpose |
|---|---|
types |
Symbol taxonomy: SymbolKind, VarKind, and LSP protocol mappings |
cursor |
Cursor-based symbol extraction helpers (token under cursor, UTF-16 column handling) |
index |
Trie + inverted-index symbol search (SymbolIndex) |
surface |
Projection layer: derives SymbolDecl views from the Perl AST |
Quick start
use ;
let var = Variable;
assert_eq!;
// LSP protocol mapping
assert_eq!;
Benchmarks
Run the perl-symbol benchmark suite with:
The suite currently tracks cursor extraction, UTF-16 token extraction, symbol-range lookup, index insertion/query performance at 1k symbols, and surface declaration projection workloads.
History
This crate consolidates four former microcrates (perl-symbol-types,
perl-symbol-cursor, perl-symbol-index, perl-symbol-surface) into a single
published facade as part of ADR-0041 (microcrate collapse). See PR #4428 for
the Wave B collapse that produced this crate.
License
MIT OR Apache-2.0