Skip to main content

python_import_bindings_from_imports

Function python_import_bindings_from_imports 

Source
pub fn python_import_bindings_from_imports(
    imports: &[ImportInfo],
    root: Node<'_>,
    source_len: usize,
) -> Vec<PythonImportBinding>
Expand description

Build import bindings from the canonical generic import projection.

The producer has already interpreted each path and retained lexical scope byte ranges in the import facts. This adapter only maps those ranges back to the caller’s prepared tree to recover the nearest function or lambda scope; it never reparses source or reconstructs import syntax.