Skip to content

Commit

Permalink
php scope migration (#2342)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson authored May 22, 2024
1 parent f9d2834 commit f2eec02
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/cursorless-engine/src/languages/php.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ function castTypeExtractor(
const nodeMatchers: Partial<
Record<SimpleScopeTypeType, NodeMatcherAlternative>
> = {
name: [
"assignment_expression[left]",
"class_declaration[name]",
"function_definition[name]",
"method_declaration[name]",
],
type: cascadingMatcher(
trailingMatcher(["~cast_expression[type]"]),
matcher(patternFinder("cast_expression[type]"), castTypeExtractor),
Expand Down
13 changes: 13 additions & 0 deletions queries/php.scm
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,16 @@
(function_call_expression)
(object_creation_expression)
] @functionCall

(assignment_expression
left: (_) @name
) @_.domain
(class_declaration
name: (_) @name
) @_.domain
(function_definition
name: (_) @name
) @_.domain
(method_declaration
name: (_) @name
) @_.domain

0 comments on commit f2eec02

Please sign in to comment.