Skip to content

Removed legacy language machinery #2956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ export interface ScopeSupportFacetInfo {

export enum ScopeSupportFacetLevel {
supported,
supportedLegacy,
unsupported,
notApplicable,
}
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/types/ScopeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,5 @@ export interface IterationScopeRanges {
export enum ScopeSupport {
supportedAndPresentInEditor,
supportedButNotPresentInEditor,
supportedLegacy,
unsupported,
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export interface CursorlessEngine {
storedTargets: StoredTargetMap;
hatTokenMap: HatTokenMap;
injectIde: (ide: IDE | undefined) => void;
runIntegrationTests: () => Promise<void>;
addCommandRunnerDecorator: (
commandRunnerDecorator: CommandRunnerDecorator,
) => void;
Expand Down
3 changes: 0 additions & 3 deletions packages/cursorless-engine/src/cursorlessEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {
import { ModifierStageFactoryImpl } from "./processTargets/ModifierStageFactoryImpl";
import { ScopeHandlerFactoryImpl } from "./processTargets/modifiers/scopeHandlers";
import { runCommand } from "./runCommand";
import { runIntegrationTests } from "./runIntegrationTests";
import { ScopeInfoProvider } from "./scopeProviders/ScopeInfoProvider";
import { ScopeRangeProvider } from "./scopeProviders/ScopeRangeProvider";
import { ScopeRangeWatcher } from "./scopeProviders/ScopeRangeWatcher";
Expand Down Expand Up @@ -142,8 +141,6 @@ export async function createCursorlessEngine({
storedTargets,
hatTokenMap,
injectIde,
runIntegrationTests: () =>
runIntegrationTests(treeSitter, languageDefinitions),
addCommandRunnerDecorator: (decorator: CommandRunnerDecorator) => {
commandRunnerDecorators.push(decorator);
},
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Position, TextDocument } from "@cursorless/common";
import { type TreeSitter } from "@cursorless/common";
import type * as treeSitter from "web-tree-sitter";
import { ide } from "../../singletons/ide.singleton";
import { getNodeRange } from "../../util/nodeSelectors";
import { getNodeRange } from "./getNodeRange";
import type {
MutableQueryCapture,
MutableQueryMatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Range } from "@cursorless/common";
import type { Node } from "web-tree-sitter";

export function getNodeRange(node: Node) {
return new Range(
node.startPosition.row,
node.startPosition.column,
node.endPosition.row,
node.endPosition.column,
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Range } from "@cursorless/common";
import type { Point } from "web-tree-sitter";

export function makeRangeFromPositions(
startPosition: Point,
endPosition: Point,
) {
return new Range(
startPosition.row,
startPosition.column,
endPosition.row,
endPosition.column,
);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Position } from "@cursorless/common";
import { Range, adjustPosition } from "@cursorless/common";
import { z } from "zod";
import { makeRangeFromPositions } from "../../util/nodeSelectors";
import { makeRangeFromPositions } from "./makeRangeFromPositions";
import type { MutableQueryCapture } from "./QueryCapture";
import { QueryPredicateOperator } from "./QueryPredicateOperator";
import { isEven } from "./isEven";
Expand Down
95 changes: 0 additions & 95 deletions packages/cursorless-engine/src/languages/elseIfExtractor.ts

This file was deleted.

84 changes: 0 additions & 84 deletions packages/cursorless-engine/src/languages/getNodeMatcher.ts

This file was deleted.

Loading
Loading