Skip to content

Commit f2eec02

Browse files
php scope migration (#2342)
## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet
1 parent f9d2834 commit f2eec02

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

packages/cursorless-engine/src/languages/php.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ function castTypeExtractor(
6363
const nodeMatchers: Partial<
6464
Record<SimpleScopeTypeType, NodeMatcherAlternative>
6565
> = {
66-
name: [
67-
"assignment_expression[left]",
68-
"class_declaration[name]",
69-
"function_definition[name]",
70-
"method_declaration[name]",
71-
],
7266
type: cascadingMatcher(
7367
trailingMatcher(["~cast_expression[type]"]),
7468
matcher(patternFinder("cast_expression[type]"), castTypeExtractor),

queries/php.scm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,16 @@
8484
(function_call_expression)
8585
(object_creation_expression)
8686
] @functionCall
87+
88+
(assignment_expression
89+
left: (_) @name
90+
) @_.domain
91+
(class_declaration
92+
name: (_) @name
93+
) @_.domain
94+
(function_definition
95+
name: (_) @name
96+
) @_.domain
97+
(method_declaration
98+
name: (_) @name
99+
) @_.domain

0 commit comments

Comments
 (0)