pub struct AtomExtractor { /* private fields */ }Expand description
Atom extractor for a specific language
Implementations§
Source§impl AtomExtractor
impl AtomExtractor
Sourcepub fn new(language: impl Into<String>, config: AtomizerConfig) -> Self
pub fn new(language: impl Into<String>, config: AtomizerConfig) -> Self
Create a new extractor for a language
Sourcepub fn extract(&self, source: &str) -> CadiResult<Vec<ExtractedAtom>>
pub fn extract(&self, source: &str) -> CadiResult<Vec<ExtractedAtom>>
Extract atoms from source code
When the ast-parsing feature is enabled, this uses Tree-sitter.
Otherwise, falls back to regex-based extraction.
Auto Trait Implementations§
impl Freeze for AtomExtractor
impl RefUnwindSafe for AtomExtractor
impl Send for AtomExtractor
impl Sync for AtomExtractor
impl Unpin for AtomExtractor
impl UnwindSafe for AtomExtractor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more