Skip to main content

Crate mir_analyzer

Crate mir_analyzer 

Source

Re-exports§

pub use file_analyzer::BatchFileAnalyzer;
pub use file_analyzer::FileAnalysis;
pub use file_analyzer::FileAnalyzer;
pub use file_analyzer::ParsedFile;
pub use php_version::ParsePhpVersionError;
pub use php_version::PhpVersion;
pub use project::AnalysisResult;
pub use project::ProjectAnalyzer;
pub use session::AnalysisSession;
pub use symbol::DocumentSymbol;
pub use symbol::DocumentSymbolKind;
pub use symbol::ResolvedSymbol;
pub use symbol::SymbolKind;
pub use composer::ComposerError;
pub use composer::Psr4Map;

Modules§

composer
file_analyzer
Per-file analysis entry point for incremental analysis.
php_version
Target PHP language version.
project
session
Session-based analysis API for incremental, per-file analysis.
symbol
Per-expression resolved symbol data, retained from Pass 2.

Structs§

DependencyGraph
File dependency graph: tracks which files depend on which other files. Used for incremental invalidation in LSP servers and build systems.
DocblockParser
FnParam
HoverInfo
Hover information for a symbol at a source location. Includes the inferred type, optional docstring, and location of definition.
Issue
Location
Source location: file path and a Unicode code-point span.
ParsedDocblock
Position
A position in source code: 1-based line, 0-based codepoint column.
Range
A range in source code: start and end positions.
StubVfs
A read-only map from stub file path to its embedded PHP source content.
TemplateParam
Type

Enums§

IssueKind
LazyLoadOutcome
Result of a lazy-load attempt.
ScopeId
Identifies a single analysis scope within a project.
Severity
Symbol
A semantic identifier for a code entity that the analyzer can resolve.
SymbolLookupError
Reason a symbol lookup did not return a location.
Visibility

Traits§

ClassResolver
Pluggable strategy for mapping a fully-qualified class name to the file that should define it. The analyzer never touches vendor/ or the filesystem on its own — it asks a ClassResolver when a symbol is needed.

Functions§

is_builtin_function
Returns true if name is a known PHP built-in function.
location_from_span
Convert a parser php_ast::Span (byte-offset range) into a mir_codebase::storage::Location (file path + 1-based line range + 0-based codepoint columns) using source and the parser’s source_map.
stub_files
Every PHP stub file from stubs/{ext}/ embedded at compile time as (path, content).
type_from_hint
Convert a PHP AST type hint to a mir Union type. context_fqcn is the class where this type hint appears (used for self/parent).