| 132 | /// ``` |
| 133 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 134 | pub struct Leaf { |
| 135 | /// Globally unique identifier for this token. |
| 136 | id: LeafId, |
| 137 | |
| 138 | /// The branch (line) this token belongs to. |
| 139 | branch: BranchId, |
| 140 | |
| 141 | /// Semantic classification of this token. |
| 142 | kind: TokenKind, |
| 143 | |
| 144 | /// Byte range in the content blob. |
| 145 | content_start: u32, |
| 146 | content_end: u32, |
| 147 | |
| 148 | /// Current lifecycle state. |
| 149 | state: LeafState, |
| 150 | } |
| 151 | |
| 152 | impl Leaf { |
| 153 | /// Creates a new leaf with the given properties. |
no outgoing calls