Skip to content

Commit

Permalink
Add support for parameter.outer for PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire authored and theHamsta committed Jan 9, 2022
1 parent cf81b1e commit 9960064
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions queries/php/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,20 @@
(_ (switch_block) @block.inner) @block.outer

;; parameters
(formal_parameters
(simple_parameter) @parameter.inner)

(arguments
(argument) @parameter.inner)
"," @_start .
(_) @parameter.inner
(#make-range! "parameter.outer" @_start @parameter.inner))
(arguments
. (_) @parameter.inner
. ","? @_end
(#make-range! "parameter.outer" @parameter.inner @_end))

(formal_parameters
"," @_start .
(_) @parameter.inner
(#make-range! "parameter.outer" @_start @parameter.inner))
(formal_parameters
. (_) @parameter.inner
. ","? @_end
(#make-range! "parameter.outer" @parameter.inner @_end))

0 comments on commit 9960064

Please sign in to comment.