diff --git a/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeNode.ts b/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeTreeNode.ts similarity index 80% rename from packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeNode.ts rename to packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeTreeNode.ts index 6cf8826a5f..2220dea90b 100644 --- a/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeNode.ts +++ b/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeTreeNode.ts @@ -1,7 +1,7 @@ import type { Range } from "@cursorless/common"; -export class RangeNode { - children: RangeNode[] = []; +export class RangeTreeNode { + children: RangeTreeNode[] = []; constructor(private item: T) {} diff --git a/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/createRangeTree.ts b/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/createRangeTree.ts index 06beec8e43..13b62a1d90 100644 --- a/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/createRangeTree.ts +++ b/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/createRangeTree.ts @@ -1,5 +1,5 @@ import type { Range } from "@cursorless/common"; -import { RangeNode } from "./RangeNode"; +import { RangeTreeNode } from "./RangeTreeNode"; /** * Creates a tree of ranges from a list of ranges. This improves containing lookup time. @@ -8,12 +8,12 @@ import { RangeNode } from "./RangeNode"; */ export function createRangeTree( items: T[], -): RangeNode[] { - const results: RangeNode[] = []; - const parents: RangeNode[] = []; +): RangeTreeNode[] { + const results: RangeTreeNode[] = []; + const parents: RangeTreeNode[] = []; for (const item of items) { - const node = new RangeNode(item); + const node = new RangeTreeNode(item); while ( parents.length > 0 &&