Expand description
§type-sitter-lib: type-sitter code for generated / downstream code
See type-sitter
for background information. This is the library
which code generated from type-sitter depends on at runtime.
Instead of depending on this, typically you should depend on type-sitter
instead and, if necessary,
use-default-features = false
to avoid depending on type-sitter-proc
. type-sitter
with no features simply
re-exports this crate.
Re-exports§
pub use tree_sitter as raw;
Structs§
- Error
- A stub node that indicates a localized parse error.
- Extra
- A node that can annotate any other node, e.g. a comment.
- Included
Ranges Error - An error that occurred in
Parser::set_included_ranges
. - Incorrect
Kind - Error when attempting to wrap a node of the wrong kind
- Input
Edit - A summary of a change to a text document.
- Language
- An opaque object that defines how to parse a particular language. The code
for each
Language
is generated by the Tree-sitter CLI. - Language
Error - An error that occurred when trying to assign an incompatible
Language
to aParser
. - Language
Ref - Missing
- A stub node that indicates another node was expected.
- Parser
- A stateful object that this is used to produce a tree based on some source code.
- Point
- A position in a multi-line text document, in terms of rows and columns.
- Query
Captures - Iterate a query’s captures (see [RawQueryCaptures])
- Query
Cursor - Wraps tree-sitter’s
QueryCursor
wherematches
andcaptures
are always typed. - Query
Match Captures - Captures from a
QueryMatch
- Query
Match Captures Into Iter - Iterate captures from a
QueryMatch
- Query
Matches - Iterate a typed query’s matches (see tree-sitter’s
QueryMatches
). - Query
Property - A key-value pair associated with a particular pattern in a
Query
. - Range
- A range of positions in a multi-line text document, both in terms of bytes and of rows and columns.
- Tree
- Tree
Cursor - A stateful object for walking a syntax tree efficiently. See
raw::TreeCursor
- Untyped
Named Node - A node that is untyped other than being named.
- Untyped
Node - A node that is untyped, but implements
Node
anyways.
Enums§
- Incorrect
Kind Cause - Underlying cause of why the node is the wrong kind
Traits§
- HasChild
- A node that has a single named child (besides extras) and no fields.
- HasChildren
- A node that has multiple named children (besides extras) and no fields.
- HasOptional
Child - A node that has a single optional named child (besides extras) and no fields.
- Node
- Typed node wrapper.
- Option
Node Result Ext - Useful trait to unwrap an
Option<NodeResult<'tree, T>>
- Query
- A query which can generate type-safe matches and captures, which contain typed nodes
- Query
Capture - A capture from a
Query
with typed nodes - Query
Match - A match from a
Query
with typed nodes - Streaming
Iterator - An interface for dealing with streaming iterators.
Type Aliases§
- Never
- Never type (for the weird case when there is an accessor that can’t return anything)
- Node
Result - Result of attempting to wrap a node