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
47
48
49
50
//! Rowan-based incremental parser for SysML v2
//!
//! This module provides a lossless, incremental parser using:
//! - **logos** for fast lexing
//! - **rowan** for the CST (Concrete Syntax Tree)
//!
//! This is the rust-analyzer approach: we build a lossless CST that preserves
//! all whitespace and comments, then extract an AST layer on top.
//!
//! ## Architecture
//!
//! ```text
//! Source Text
//! ↓
//! Lexer (logos) → Tokens with SyntaxKind
//! ↓
//! Parser → GreenNode tree (immutable, cheap to clone)
//! ↓
//! SyntaxNode (rowan) → CST with parent pointers
//! ↓
//! AST layer → Typed wrappers over SyntaxNode
//! ↓
//! HIR → Semantic model
//! ```
//!
//! ## Incremental Reparsing
//!
//! When text changes, we:
//! 1. Find the smallest subtree containing the change
//! 2. Reparse only that subtree
//! 3. Reuse unchanged green nodes (they're immutable and cheap to share)
pub use *;
pub use ;
pub use ;
pub use ;
pub use ;
/// Re-export rowan types for convenience
pub use ;