pub struct ParsedFile<'a> { /* private fields */ }Expand description
A parsed source file with its tree-sitter parse tree and original source code.
Implementations§
Source§impl<'a> ParsedFile<'a>
impl<'a> ParsedFile<'a>
Sourcepub fn render_node(&self, node: Node<'_>) -> Result<String, ExtractionError>
pub fn render_node(&self, node: Node<'_>) -> Result<String, ExtractionError>
Sourcepub fn make_query(&self, query: &str) -> Result<Query, ExtractionError>
pub fn make_query(&self, query: &str) -> Result<Query, ExtractionError>
Sourcepub fn exec_query<'b>(
&'b self,
query: &'b Query,
node: Node<'b>,
cursor: &'b mut QueryCursor,
) -> QueryMatches<'b, 'b, &'b [u8], &'b [u8]>
pub fn exec_query<'b>( &'b self, query: &'b Query, node: Node<'b>, cursor: &'b mut QueryCursor, ) -> QueryMatches<'b, 'b, &'b [u8], &'b [u8]>
Auto Trait Implementations§
impl<'a> Freeze for ParsedFile<'a>
impl<'a> RefUnwindSafe for ParsedFile<'a>
impl<'a> Send for ParsedFile<'a>
impl<'a> Sync for ParsedFile<'a>
impl<'a> Unpin for ParsedFile<'a>
impl<'a> UnwindSafe for ParsedFile<'a>
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