Expand description
Tree structures for representing kind trees (green and red trees). Red-green tree implementation for efficient kind tree representation.
This module provides the core red-green tree data structures that enable efficient incremental parsing and kind tree manipulation.
§Key Components
- Green Trees: Immutable, position-agnostic kind tree nodes allocated in an Arena.
- Red Trees: Position-aware kind tree nodes computed from green trees.
§Architecture
The red-green tree design enables:
- Incremental Parsing: Only re-parse changed regions of source code
- Memory Efficiency: Arena-based allocation with minimal overhead
- Performance: Zero-copy node construction and fast traversal
Re-exports§
pub use self::red_tree::RedChildren;pub use self::red_tree::RedLeaf;pub use self::red_tree::RedNode;pub use self::red_tree::RedTree;
Modules§
- red_
tree - Red-green tree implementation with position information for incremental parsing.
Structs§
- Arc
- An atomically reference counted shared pointer
- Cursor
- A cursor for traversing a GreenTree.
- Green
Leaf - A green leaf kind that stores only kind and length.
- Green
Node - A green node that contains child elements.
Enums§
- Green
Tree - A green tree element - either a node or a leaf kind.