pub struct SimpleAstParser {}Expand description
Optimized AST parser for import extraction with parser reuse and TreeCursor traversal
Implementations§
Source§impl SimpleAstParser
impl SimpleAstParser
Sourcepub fn extract_imports(
&self,
content: &str,
language: ImportLanguage,
) -> Result<Vec<SimpleImport>>
pub fn extract_imports( &self, content: &str, language: ImportLanguage, ) -> Result<Vec<SimpleImport>>
Extract imports from the given content using optimized tree-sitter traversal
Sourcepub fn extract_imports_parallel(
&self,
files: &[(String, String, ImportLanguage)],
) -> Result<Vec<(String, Vec<SimpleImport>)>>
pub fn extract_imports_parallel( &self, files: &[(String, String, ImportLanguage)], ) -> Result<Vec<(String, Vec<SimpleImport>)>>
Extract imports from multiple files in parallel for maximum performance
Sourcepub fn extract_imports_batch(
&self,
contents: &[&str],
language: ImportLanguage,
) -> Result<Vec<Vec<SimpleImport>>>
pub fn extract_imports_batch( &self, contents: &[&str], language: ImportLanguage, ) -> Result<Vec<Vec<SimpleImport>>>
Batch extract imports for multiple contents with the same language
Trait Implementations§
Source§impl Debug for SimpleAstParser
impl Debug for SimpleAstParser
Auto Trait Implementations§
impl Freeze for SimpleAstParser
impl RefUnwindSafe for SimpleAstParser
impl Send for SimpleAstParser
impl Sync for SimpleAstParser
impl Unpin for SimpleAstParser
impl UnwindSafe for SimpleAstParser
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more