Skip to main content

Module symbol

Module symbol 

Source
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.

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§

FrameworkFlags
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.
SymbolExtractor
Extract symbols from an AST for Parse/Index workflows.
SymbolReference
A reference to a symbol with usage context for Navigate/Analyze workflows.
SymbolTable
Comprehensive symbol table for Perl code analysis and LSP features in Index/Analyze stages.

Enums§

AsyncFrameworkKind
Async framework variant detected via use statements during Parse/Analyze workflows.
FrameworkKind
Classification of Moo/Moose framework variant detected via use statements during Parse/Analyze workflows.
ScopeKind
Classification of lexical scope types in Perl for Parse/Analyze workflows.
SymbolKind
Unified Perl symbol classification for LSP tooling.
VarKind
Variable sigil classification for Perl’s three primary container types.
WebFrameworkKind
Web framework variant detected via use statements during Parse/Analyze workflows.

Functions§

is_universal_method
Return true if the method is one of Perl’s always-available UNIVERSAL methods.

Type Aliases§

ScopeId
Unique identifier for a scope used during Index/Analyze workflows.