Crate plotnik_core

Crate plotnik_core 

Source
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

Structs§

Cardinality
Cardinality info for a field or children slot.
ChildrenInfo
Information about a node type’s children (non-field children).
DynamicNodeTypes
Compiled node type database for a language (dynamic/heap-allocated).
FieldInfo
Information about a single field on a node type.
NodeTypeInfo
Complete node type information.
RawCardinality
Cardinality constraints for a field or children slot.
RawNode
Raw node definition from node-types.json.
RawTypeRef
Reference to a node type.
StaticChildrenInfo
Children info for static storage.
StaticFieldInfo
Field info for static storage.
StaticNodeTypeInfo
Complete node type information for static storage.
StaticNodeTypes
Compiled node type database with static storage.

Traits§

NodeTypes
Trait for node type constraint lookups.

Functions§

parse_node_types
Parse node-types.json content into raw nodes.

Type Aliases§

NodeFieldId
Field ID (tree-sitter uses NonZeroU16).
NodeTypeId
Node type ID (tree-sitter uses u16).