Skip to main content

parse_module_ast

Function parse_module_ast 

Source
pub fn parse_module_ast<'db>(
    db: &'db dyn Db,
    module: Module<'db>,
) -> &'db ParsedStatements<'db>
Expand description

Parse a module and return just its statements.

Derived from parse_module_full rather than parsing again, so a module is parsed once however many callers want only its statements. Splitting the statements out this way also firewalls them: an edit that moves spans without changing any statement re-runs parse_module_full, but this returns an equal value and backdates, so name resolution downstream does not re-run.