Crate type_sitter_lib
source ·Expand description
type-sitter-lib: type-sitter code for generated / downstream code
See type-sitter
for more information. This is the library which code generated from type-sitter depends on.
The yak-sitter
feature allows you to use yak-sitter
, an opinionated alternative tree-sitter facade, instead of the original tree-sitter
datatypes.
Modules
- “Private” structures for type_sitter_gen
Structs
- Error when attempting to wrap a node of the wrong kind
- Error when attempting to wrap a tree whose root node is the wrong kind
- Iterate a query’s captures (see tree_sitter::QueryCaptures)
- Captures from a crate::TypedQueryMatch
- Iterate captures from a crate::TypedQueryMatch
- Iterate a typed query’s matches (see tree_sitter::QueryMatches)
- Tree whose root is a typed node. Currently we don’t know which node is the root, so you must manually construct this with the correct type argument (still checked though).
- Untyped “typed” named node (implements TypedNode but don’t actually have a type, except that it’s named)
- Untyped “typed” named or anonymous node (implements TypedNode but don’t actually have a type)
Enums
- May be a comment or other “extra” instead of the positionally-expected node kind
- Underlying cause of why the node is the wrong kind
Traits
- Useful trait to unwrap a
NodeResult<'tree, ExtraOr<'tree, T>>
- Useful trait to unwrap an
Option<NodeResult<'tree, T>
- Useful trait to unwrap an
Option<NodeResult<'tree, ExtraOr<'tree, T>>>
- Allows QueryCursor to run typed queries.
- Typed node wrapper.
- Workaround to specify TypedNode types which are lifetime-irrelevant
- A query which can generate type-safe matches and captures, which contain crate::TypedNodes
- A capture from a TypedQuery with crate::TypedNodes
- A match from a TypedQuery with crate::TypedNodes
Type Definitions
- Never type (for the weird case when there is an accessor that can’t return anything)
- Result of attempting to wrap a node