pub struct KindMatcher<L: Language> { /* private fields */ }

Implementations§

Whether the kind matcher contains undefined tree-sitter kind.

Whether the kind will match parsing error occurred in the source code. for example, we can use kind: ERROR in YAML to find invalid syntax in source. the name is_error implies the matcher itself is error. But here the matcher itself is valid and it is what it matches is error.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the node why the input is matched or None if not matched. The return value is usually input node itself, but it can be different node. For example Has matcher can return the child or descendant node.
Returns a bitset for all possible target node kind ids. Returns None if the matcher needs to try against all node kind.
get_match_len will skip trailing anonymous child node to exclude punctuation.

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.