Skip to main content

Parser

Trait Parser 

Source
pub trait Parser: Send + Sync {
    // Required methods
    fn parse(&self, path: &Path, source: &[u8]) -> ExtractionResult;
    fn supported_extensions(&self) -> &[&str];
}
Expand description

A source-file parser that produces graph nodes and edges.

Implementations must be Send + Sync so they can be shared across threads when processing files in parallel.

Required Methods§

Source

fn parse(&self, path: &Path, source: &[u8]) -> ExtractionResult

Parse a single source file and return the extracted entities and relationships.

Source

fn supported_extensions(&self) -> &[&str]

File extensions this parser can handle (e.g. [".py", ".pyi"]).

Implementors§