Skip to main content

Module manager

Module manager 

Source
Expand description

Universal high-performance parser manager.

§Overview

Provides a unified, fault‑tolerant entry point for parsing source code across multiple programming languages.

§Design Goals

  • Zero‑panic parsing pipeline
  • Deterministic behaviour
  • Efficient large‑scale directory traversal
  • Minimal memory overhead
  • Extensible language backends

§Features

  • Multi‑language dispatch
  • Extension‑based file filtering
  • Graceful failure handling (I/O errors, unsupported languages)
  • Relative path normalisation
  • Batched file processing

§Execution Model

  1. Discover files
  2. Filter by extension
  3. Read sources
  4. Dispatch parser
  5. Collect facts

§Safety Guarantees

  • No unwrap()
  • No panic propagation
  • I/O errors isolated per file (skipped silently)
  • Parse errors isolated per file (skipped silently)

§Output

Returns a vector of (relative_path, Vec<RawNode>).

Structs§

ParserManager
Stateless parser manager.

Functions§

discover_files 🔒
Walk a directory and collect every file whose extension matches the language filter.
extensions_for_language 🔒
Return the list of file extensions accepted for a given language.
normalize_root 🔒
Return the canonical form of root, or the original if it fails.
process_file 🔒
Read a single file, parse it, and return None on any failure.
relative_path 🔒
Compute a relative path from base to path.
should_include 🔒
Check whether path should be included based on the allowed extensions.