pub struct Sitter { /* private fields */ }Expand description
Sitter handles Tree-sitter parsing for multiple languages
Implementations§
Source§impl Sitter
impl Sitter
pub fn new() -> Self
Sourcepub fn is_supported(&self, path: &Path) -> bool
pub fn is_supported(&self, path: &Path) -> bool
Check if the file at the given path is supported by Tree-sitter
Sourcepub fn find_functions(
&mut self,
path: &Path,
code: &str,
) -> Result<Vec<FunctionMatch>>
pub fn find_functions( &mut self, path: &Path, code: &str, ) -> Result<Vec<FunctionMatch>>
Find function definitions in the given file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sitter
impl RefUnwindSafe for Sitter
impl Send for Sitter
impl Sync for Sitter
impl Unpin for Sitter
impl UnwindSafe for Sitter
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