Skip to content

Commit 40621ea

Browse files
clean up
1 parent 57aff0e commit 40621ea

File tree

1 file changed

+2
-6
lines changed
  • packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler

1 file changed

+2
-6
lines changed

packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeLookupTree.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function createNodes<T extends { range: Range }>(
4141
const parent = parents[parents.length - 1];
4242

4343
if (parent != null) {
44-
parent.addChildNode(node);
44+
parent.children.add(node);
4545
} else {
4646
results.push(node);
4747
}
@@ -53,7 +53,7 @@ function createNodes<T extends { range: Range }>(
5353
}
5454

5555
class RangeLookupTreeNode<T extends { range: Range }> {
56-
private children: RangeLookupList<RangeLookupTreeNode<T>>;
56+
public children: RangeLookupList<RangeLookupTreeNode<T>>;
5757

5858
constructor(private item: T) {
5959
this.children = new RangeLookupList([]);
@@ -63,10 +63,6 @@ class RangeLookupTreeNode<T extends { range: Range }> {
6363
return this.item.range;
6464
}
6565

66-
addChildNode(node: RangeLookupTreeNode<T>) {
67-
this.children.add(node);
68-
}
69-
7066
getSmallLestContaining(range: Range): T {
7167
const child = this.children
7268
.getContaining(range)

0 commit comments

Comments
 (0)