Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson committed Dec 26, 2024
1 parent 57aff0e commit 40621ea
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function createNodes<T extends { range: Range }>(
const parent = parents[parents.length - 1];

if (parent != null) {
parent.addChildNode(node);
parent.children.add(node);
} else {
results.push(node);
}
Expand All @@ -53,7 +53,7 @@ function createNodes<T extends { range: Range }>(
}

class RangeLookupTreeNode<T extends { range: Range }> {
private children: RangeLookupList<RangeLookupTreeNode<T>>;
public children: RangeLookupList<RangeLookupTreeNode<T>>;

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

addChildNode(node: RangeLookupTreeNode<T>) {
this.children.add(node);
}

getSmallLestContaining(range: Range): T {
const child = this.children
.getContaining(range)
Expand Down

0 comments on commit 40621ea

Please sign in to comment.