pub trait BuiltinExtractor: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn extensions(&self) -> &[&str];
fn extract(&self, source: &str, file: &RelativePath) -> Vec<Annotation>;
}Expand description
A built-in extractor that discovers annotations from source code.
Built-in extractors use tree-sitter for parsing and run in-process. They can be overridden by subprocess extractors in the manifest.
Required Methods§
Sourcefn extensions(&self) -> &[&str]
fn extensions(&self) -> &[&str]
File extensions this extractor applies to (including the dot).
Sourcefn extract(&self, source: &str, file: &RelativePath) -> Vec<Annotation>
fn extract(&self, source: &str, file: &RelativePath) -> Vec<Annotation>
Extract annotations from source text.