Skip to main content

Module parser

Module parser 

Source
Expand description

Multi-language tree-sitter parser — Layer 0 static analysis.

Each supported language lives in its own submodule with isolated statics: LazyLock<Language>, LazyLock<Query>, LazyLock<Captures>, thread_local! Parser. Adding a language = copy a module.

§Performance

  • One combined query per language, single tree traversal per file.
  • Thread-local parsers: one per rayon worker, reused across files.
  • Disk read skipped for unsupported languages.
  • Count-only captures: no text allocated for counting signals.

Re-exports§

pub use import::ImportKind;
pub use import::ImportStatement;

Modules§

import
Structured import representation for cross-file resolution.

Structs§

HashParseOutput
Output of the combined mtime-check + parse pass.
StaticFileAnalysis
Structural signals extracted from a single source file by tree-sitter.

Functions§

hash_and_parse_parallel
Combined mtime-check + parse pass.
parse_file
Parse a single file and return its structural analysis.
parse_files_parallel
Parse a slice of files in parallel using rayon.