pub trait LanguageParser: Send + Sync {
// Required methods
fn extract_units(
&self,
tree: &Tree,
source: &str,
file_path: &Path,
) -> AcbResult<Vec<RawCodeUnit>>;
fn is_test_file(&self, path: &Path, source: &str) -> bool;
}Expand description
Trait for language-specific parsers.
Required Methods§
Sourcefn extract_units(
&self,
tree: &Tree,
source: &str,
file_path: &Path,
) -> AcbResult<Vec<RawCodeUnit>>
fn extract_units( &self, tree: &Tree, source: &str, file_path: &Path, ) -> AcbResult<Vec<RawCodeUnit>>
Extract code units from a parsed tree.
Sourcefn is_test_file(&self, path: &Path, source: &str) -> bool
fn is_test_file(&self, path: &Path, source: &str) -> bool
Check if a file is a test file.