mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
In JS/TS, correctly highlight a variable with a default value…
…when destructuring an array.
This commit is contained in:
parent
99722454b8
commit
a34b01bfb2
@ -145,6 +145,13 @@
|
||||
(array_pattern
|
||||
(identifier) @variable.other.assignment.destructuring.js))
|
||||
|
||||
; A variable array destructuring with a default:
|
||||
; The "baz" in `let [foo, bar, baz = false] = something`
|
||||
(variable_declarator
|
||||
(array_pattern
|
||||
(assignment_pattern
|
||||
(identifier) @variable.other.assignment.destructuring.js)))
|
||||
|
||||
; A variable declaration in a for…(in|of) loop:
|
||||
; The "foo" in `for (let foo of bar) {`
|
||||
(for_in_statement
|
||||
|
@ -136,6 +136,13 @@
|
||||
(array_pattern
|
||||
(identifier) @variable.other.assignment.destructuring._LANG_))
|
||||
|
||||
; A variable array destructuring with a default:
|
||||
; The "baz" in `let [foo, bar, baz = false] = something`
|
||||
(variable_declarator
|
||||
(array_pattern
|
||||
(assignment_pattern
|
||||
(identifier) @variable.other.assignment.destructuring.js)))
|
||||
|
||||
; A variable declaration in a for…(in|of) loop:
|
||||
; The "foo" in `for (let foo of bar) {`
|
||||
(for_in_statement
|
||||
|
Loading…
Reference in New Issue
Block a user