1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Core runtime implementation for the tree-sitter library.
//!
//! A normal parse flows through these modules in one direction: [`parser`]
//! asks [`lexer`] for a token using tables exposed by [`language`], interprets
//! parse actions while storing alternatives in [`stack`], and builds values
//! owned by [`subtree`]. The accepted root becomes a [`tree`]; [`node`] and
//! [`tree_cursor`] provide public views over it, while [`get_changed_ranges`]
//! compares completed trees.
//!
//! Modules at this level correspond to the runtime's established components.
//! Their exported functions preserve the C API, but internal parser, stack,
//! and storage types use Rust layout unless a module documents an ABI boundary.
//!
//! The only C source retained by the Rust core is the variadic lexer logging
//! shim, because stable Rust cannot define C-variadic functions.
// Leaf utilities.
// Core syntax-tree storage.
// Parsing components.
// Tree navigation and change tracking.
// Parser engine.
// Kept separate from the active-runtime readability work.
// Internal helpers for the active Rust runtime (no corresponding .c file).