Enum tree_sitter_graph::parse_error::ParseError
source · [−]Expand description
Parse error for tree-sitter tree
Variants
Missing(Node<'tree>)
Error representing missing syntax
Unexpected(Node<'tree>)
Error representing unexpected syntax
Implementations
sourceimpl<'tree> ParseError<'tree>
impl<'tree> ParseError<'tree>
sourcepub fn first(tree: &Tree) -> Option<ParseError<'_>>
pub fn first(tree: &Tree) -> Option<ParseError<'_>>
Return the first parse error in the given tree, if it exists.
sourcepub fn into_first(tree: Tree) -> TreeWithParseErrorOption
pub fn into_first(tree: Tree) -> TreeWithParseErrorOption
Return the tree and the first parse error in the given tree, if it exists. This returns a type, combining the tree and the error, that can be moved safely, which is not possible with a seperate tree and error.
sourcepub fn all(tree: &'tree Tree) -> Vec<ParseError<'_>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn all(tree: &'tree Tree) -> Vec<ParseError<'_>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Return all parse errors in the given tree.
sourcepub fn into_all(tree: Tree) -> TreeWithParseErrorVec
pub fn into_all(tree: Tree) -> TreeWithParseErrorVec
Return the tree and all parse errors in the given tree. This returns a type, combining the tree and the errors, that can be moved safely, which is not possible with a seperate tree and errors.
sourceimpl<'tree> ParseError<'tree>
impl<'tree> ParseError<'tree>
Trait Implementations
Auto Trait Implementations
impl<'tree> RefUnwindSafe for ParseError<'tree>
impl<'tree> !Send for ParseError<'tree>
impl<'tree> !Sync for ParseError<'tree>
impl<'tree> Unpin for ParseError<'tree>
impl<'tree> UnwindSafe for ParseError<'tree>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more