pub enum ParseError<'tree> {
    Missing(Node<'tree>),
    Unexpected(Node<'tree>),
}
Expand description

Parse error for tree-sitter tree

Variants

Missing(Node<'tree>)

Error representing missing syntax

Unexpected(Node<'tree>)

Error representing unexpected syntax

Implementations

Return the first parse error in the given tree, if it exists.

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.

Return all parse errors in the given tree.

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.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.