Skip to content

Commit

Permalink
Fixed ECMAScript private member highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
lizclipse committed Apr 22, 2024
1 parent e18b772 commit 76748e3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions runtime/queries/ecma/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,24 @@
name: (identifier) @function)
(method_definition
name: (property_identifier) @function.method)
(method_definition
name: (private_property_identifier) @function.method.private)

(pair
key: (property_identifier) @function.method
value: [(function) (arrow_function)])
(pair
key: (private_property_identifier) @function.method.private
value: [(function) (arrow_function)])

(assignment_expression
left: (member_expression
property: (property_identifier) @function.method)
right: [(function) (arrow_function)])
(assignment_expression
left: (member_expression
property: (private_property_identifier) @function.method.private)
right: [(function) (arrow_function)])

(variable_declarator
name: (identifier) @function
Expand All @@ -64,6 +73,9 @@
(call_expression
function: (member_expression
property: (property_identifier) @function.method))
(call_expression
function: (member_expression
property: (private_property_identifier) @function.method.private))

; Variables
;----------
Expand All @@ -74,6 +86,7 @@
;-----------

(property_identifier) @variable.other.member
(private_property_identifier) @variable.other.member.private
(shorthand_property_identifier) @variable.other.member
(shorthand_property_identifier_pattern) @variable.other.member

Expand Down

0 comments on commit 76748e3

Please sign in to comment.