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§
Sourcefn parse(&self, path: &Path, source: &[u8]) -> ExtractionResult
fn parse(&self, path: &Path, source: &[u8]) -> ExtractionResult
Parse a single source file and return the extracted entities and relationships.
Sourcefn supported_extensions(&self) -> &[&str]
fn supported_extensions(&self) -> &[&str]
File extensions this parser can handle (e.g. [".py", ".pyi"]).