Expand description
Symbol table, extraction, and reference tracking. Semantic analysis, symbol extraction, and type inference. Symbol extraction and symbol table construction. Symbol extraction and symbol table for IDE features
This module provides symbol extraction from the AST, building a symbol table that tracks definitions, references, and scopes for IDE features like go-to-definition, find-all-references, and semantic highlighting.
§Related Modules
See also crate::workspace_index for workspace-wide indexing and
cross-file reference resolution.
§Usage Examples
use perl_semantic_analyzer::{Parser, symbol::SymbolExtractor};
let mut parser = Parser::new("sub hello { my $x = 1; }");
let ast = parser.parse()?;
let extractor = SymbolExtractor::new();
let table = extractor.extract(&ast);
assert!(table.symbols.contains_key("hello"));Structs§
- Framework
Flags - Per-package framework detection flags used in Parse/Analyze workflows.
- Scope
- A lexical scope in Perl code with hierarchical symbol visibility for Parse/Analyze stages.
- Symbol
- A symbol definition in Perl code with comprehensive metadata for Index/Navigate workflows.
- Symbol
Extractor - Extract symbols from an AST for Parse/Index workflows.
- Symbol
Reference - A reference to a symbol with usage context for Navigate/Analyze workflows.
- Symbol
Table - Comprehensive symbol table for Perl code analysis and LSP features in Index/Analyze stages.
Enums§
- Async
Framework Kind - Async framework variant detected via
usestatements during Parse/Analyze workflows. - Framework
Kind - Classification of Moo/Moose framework variant detected via
usestatements during Parse/Analyze workflows. - Scope
Kind - Classification of lexical scope types in Perl for Parse/Analyze workflows.
- Symbol
Kind - Unified Perl symbol classification for LSP tooling.
- VarKind
- Variable sigil classification for Perl’s three primary container types.
- WebFramework
Kind - Web framework variant detected via
usestatements during Parse/Analyze workflows.
Functions§
- is_
universal_ method - Return
trueif the method is one of Perl’s always-availableUNIVERSALmethods.
Type Aliases§
- ScopeId
- Unique identifier for a scope used during Index/Analyze workflows.