Skip to content

Commit e71b44c

Browse files
committed
Improve name
1 parent 850f114 commit e71b44c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/cursorless-vscode/src/keyboard/grammar/MyPostProcess.ts renamed to packages/cursorless-vscode/src/keyboard/grammar/CommandRulePostProcessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
* sidebar. The reason we keep the metadata here is that the postprocess
1212
* function is the only thing we have control over in the nearley parser.
1313
*/
14-
export interface MyPostProcess<
14+
export interface CommandRulePostProcessor<
1515
T extends keyof KeyboardCommandArgTypes = keyof KeyboardCommandArgTypes,
1616
> {
1717
(args: any[]): KeyboardCommand<T>;

packages/cursorless-vscode/src/keyboard/grammar/getAcceptableTokenTypes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nearley, { State } from "nearley";
22
import { isEqual, uniqWith } from "lodash";
3-
import { MyPostProcess } from "./MyPostProcess";
3+
import { CommandRulePostProcessor } from "./CommandRulePostProcessor";
44
import { WorkQueue } from "./WorkQueue";
55

66
/**
@@ -34,7 +34,7 @@ export function getAcceptableTokenTypes(parser: nearley.Parser) {
3434
}
3535

3636
function getMetadata(state: nearley.State) {
37-
return (state.rule.postprocess as unknown as MyPostProcess).metadata;
37+
return (state.rule.postprocess as unknown as CommandRulePostProcessor).metadata;
3838
}
3939

4040
/**

packages/cursorless-vscode/src/keyboard/grammar/grammarHelpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { KeyboardCommandArgTypes } from "../KeyboardCommandTypeHelpers";
2-
import { MyPostProcess } from "./MyPostProcess";
2+
import { CommandRulePostProcessor } from "./CommandRulePostProcessor";
33

44
function constructPayload(args: any[], argNames: (string | null)[]) {
55
const arg: Record<string, any> = {};
@@ -16,7 +16,7 @@ function constructPayload(args: any[], argNames: (string | null)[]) {
1616
export function command<T extends keyof KeyboardCommandArgTypes>(
1717
type: T,
1818
argNames: (keyof KeyboardCommandArgTypes[T] | null)[],
19-
): MyPostProcess<T> {
19+
): CommandRulePostProcessor<T> {
2020
function ret(args: any[]) {
2121
return {
2222
type,

0 commit comments

Comments
 (0)