Skip to main content

parse_source_to_module

Function parse_source_to_module 

Source
pub fn parse_source_to_module(
    file_id: FileId,
    path: &Path,
    source: &str,
    content_hash: u64,
    need_complexity: bool,
) -> ModuleInfo
Expand description

Parse source text into a ModuleInfo.

When need_complexity is false the per-function complexity visitor is skipped, saving one full AST walk per file. The dead-code analysis pipeline never consumes complexity data, so callers that only need imports/exports should pass false.