You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: design/design.md
+5-4
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,10 @@ Public-facing:
13
13
-`src/slice.rs`: implementation of `RopeSlice`.
14
14
-`src/iter.rs`: implementations of all the iterators.
15
15
-`src/rope_builder.rs`: implementation of `RopeBuilder`.
16
+
-`src/str_utils.rs`: utility functions that operate on `&str` slices. For example, functions to count chars and line endings.
16
17
17
18
Internal-only:
18
19
-`src/tree/`: the low-level implementation of `Rope`'s internals, where most of the meat of the b-tree rope is.
19
-
-`src/str_utils.rs`: utility functions that operate on `&str` slices. For example, functions to count chars and line endings.
20
20
21
21
22
22
## B-tree Rope
@@ -125,9 +125,10 @@ Phew! Hopefully that all made sense.
125
125
126
126
Most of the logic for traversing and modifying the tree is implemented in `node.rs` as part of `Node`. As a general rule, code that needs to know which node is root is implemented in `Rope`, code that otherwise traverses or modifies the tree is implemented in `Node`, and code that only deals with a single node is implemented in `NodeText` and `NodeChildren`.
127
127
128
-
The four main functions to really pay attention to are part of `Node`:
128
+
The five main functions to really pay attention to are part of `Node`:
129
129
130
-
-`Node::edit_char_range()`
130
+
-`Node::edit_chunk_at_char()`
131
+
-`Node::remove_char_range()`
131
132
-`Node::split()`
132
133
-`Node::prepend_at_depth()`
133
134
-`Node::append_at_depth()`.
@@ -137,7 +138,7 @@ These are by far the most complex code in Ropey, and are the core editing operat
137
138
138
139
## Tree Invariants
139
140
140
-
The invariants of the tree that must hold true for the tree to operate correctly are:
141
+
The following invariants must hold true for the tree to operate correctly:
0 commit comments