Crate type_sitter_lib

Source
Expand description

§type-sitter-lib: type-sitter code for generated / downstream code

crates.io docs.rs

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.
IncludedRangesError
An error that occurred in Parser::set_included_ranges.
IncorrectKind
Error when attempting to wrap a node of the wrong kind
InputEdit
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.
LanguageError
An error that occurred when trying to assign an incompatible Language to a Parser.
LanguageRef
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.
QueryCaptures
Iterate a query’s captures (see [RawQueryCaptures])
QueryCursor
Wraps tree-sitter’s QueryCursor where matches and captures are always typed.
QueryMatchCaptures
Captures from a QueryMatch
QueryMatchCapturesIntoIter
Iterate captures from a QueryMatch
QueryMatches
Iterate a typed query’s matches (see tree-sitter’s QueryMatches).
QueryProperty
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
TreeCursor
A stateful object for walking a syntax tree efficiently. See raw::TreeCursor
UntypedNamedNode
A node that is untyped other than being named.
UntypedNode
A node that is untyped, but implements Node anyways.

Enums§

IncorrectKindCause
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.
HasOptionalChild
A node that has a single optional named child (besides extras) and no fields.
Node
Typed node wrapper.
OptionNodeResultExt
Useful trait to unwrap an Option<NodeResult<'tree, T>>
Query
A query which can generate type-safe matches and captures, which contain typed nodes
QueryCapture
A capture from a Query with typed nodes
QueryMatch
A match from a Query with typed nodes
StreamingIterator
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)
NodeResult
Result of attempting to wrap a node