pub struct ParsedSource<'a> {
pub source: &'a str,
pub tree: Tree,
}Expand description
A parsed source file with its tree-sitter tree.
Fields§
§source: &'a str§tree: TreeImplementations§
Source§impl<'a> ParsedSource<'a>
impl<'a> ParsedSource<'a>
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Check if the tree contains any ERROR nodes.
Sourcepub fn error_nodes(&self) -> Vec<ErrorNode>
pub fn error_nodes(&self) -> Vec<ErrorNode>
Get all ERROR nodes in the tree.
Auto Trait Implementations§
impl<'a> Freeze for ParsedSource<'a>
impl<'a> RefUnwindSafe for ParsedSource<'a>
impl<'a> Send for ParsedSource<'a>
impl<'a> Sync for ParsedSource<'a>
impl<'a> Unpin for ParsedSource<'a>
impl<'a> UnsafeUnpin for ParsedSource<'a>
impl<'a> UnwindSafe for ParsedSource<'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