mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
feat(javascript): highlight parameter destructuring patterns
This commit is contained in:
parent
3c42a6400e
commit
aab2274e2c
2 changed files with 25 additions and 0 deletions
|
|
@ -12,6 +12,12 @@
|
|||
(object_pattern
|
||||
(shorthand_property_identifier_pattern) @parameter))
|
||||
|
||||
;; ({ a = b }) => null
|
||||
(formal_parameters
|
||||
(object_pattern
|
||||
(object_assignment_pattern
|
||||
(shorthand_property_identifier_pattern) @parameter)))
|
||||
|
||||
;; ({ a: b }) => null
|
||||
(formal_parameters
|
||||
(object_pattern
|
||||
|
|
@ -23,6 +29,19 @@
|
|||
(array_pattern
|
||||
(identifier) @parameter))
|
||||
|
||||
;; ({ a } = { a }) => null
|
||||
(formal_parameters
|
||||
(assignment_pattern
|
||||
(object_pattern
|
||||
(shorthand_property_identifier_pattern) @parameter)))
|
||||
|
||||
;; ({ a = b } = { a }) => null
|
||||
(formal_parameters
|
||||
(assignment_pattern
|
||||
(object_pattern
|
||||
(object_assignment_pattern
|
||||
(shorthand_property_identifier_pattern) @parameter))))
|
||||
|
||||
;; a => null
|
||||
(arrow_function
|
||||
parameter: (identifier) @parameter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue