Expand description
Core data structures for Plotnik node type information.
Two layers:
- Deserialization layer: 1:1 mapping to
node-types.json - Analysis layer: ID-indexed structures for efficient lookups
Two implementations:
- Dynamic (
DynamicNodeTypes): HashMap-based, for runtime construction - Static (
StaticNodeTypes): Array-based, zero runtime init
Modules§
Structs§
- Cardinality
- Cardinality info for a field or children slot.
- Children
Info - Information about a node type’s children (non-field children).
- Dynamic
Node Types - Compiled node type database for a language (dynamic/heap-allocated).
- Field
Info - Information about a single field on a node type.
- Interner
- String interner. Deduplicates strings and returns cheap Symbol handles.
- Node
Type Info - Complete node type information.
- RawCardinality
- Cardinality constraints for a field or children slot.
- RawNode
- Raw node definition from
node-types.json. - RawType
Ref - Reference to a node type.
- Static
Children Info - Children info for static storage.
- Static
Field Info - Field info for static storage.
- Static
Node Type Info - Complete node type information for static storage.
- Static
Node Types - Compiled node type database with static storage.
- Symbol
- A lightweight handle to an interned string.
Traits§
- Node
Types - Trait for node type constraint lookups.
Functions§
- parse_
node_ types - Parse
node-types.jsoncontent into raw nodes.
Type Aliases§
- Node
Field Id - Field ID (tree-sitter uses NonZeroU16).
- Node
Type Id - Node type ID (tree-sitter uses u16, but 0 is internal-only).