Creates a new leaf with the given properties. The leaf starts in the [`LeafState::Alive`] state.
(id: LeafId, branch: BranchId, kind: TokenKind, content_range: Range<u32>)
| 154 | /// |
| 155 | /// The leaf starts in the [`LeafState::Alive`] state. |
| 156 | pub fn new(id: LeafId, branch: BranchId, kind: TokenKind, content_range: Range<u32>) -> Self { |
| 157 | Leaf { |
| 158 | id, |
| 159 | branch, |
| 160 | kind, |
| 161 | content_start: content_range.start, |
| 162 | content_end: content_range.end, |
| 163 | state: LeafState::Alive, |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | /// Returns the leaf's unique identifier. |
| 168 | #[inline] |
nothing calls this directly
no outgoing calls
no test coverage detected