Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/ecma/highlights.scm')
-rw-r--r--runtime/queries/ecma/highlights.scm31
1 files changed, 13 insertions, 18 deletions
diff --git a/runtime/queries/ecma/highlights.scm b/runtime/queries/ecma/highlights.scm
index 4ba74a4b..d56bbe14 100644
--- a/runtime/queries/ecma/highlights.scm
+++ b/runtime/queries/ecma/highlights.scm
@@ -74,12 +74,16 @@
[
"async"
"debugger"
+ "delete"
"extends"
"from"
"get"
"new"
"set"
"target"
+ "typeof"
+ "instanceof"
+ "void"
"with"
] @keyword
@@ -87,10 +91,6 @@
"of"
"as"
"in"
- "delete"
- "typeof"
- "instanceof"
- "void"
] @keyword.operator
[
@@ -161,7 +161,7 @@
; Function and method definitions
;--------------------------------
-(function_expression
+(function
name: (identifier) @function)
(function_declaration
name: (identifier) @function)
@@ -172,27 +172,27 @@
(pair
key: (property_identifier) @function.method
- value: [(function_expression) (arrow_function)])
+ value: [(function) (arrow_function)])
(pair
key: (private_property_identifier) @function.method.private
- value: [(function_expression) (arrow_function)])
+ value: [(function) (arrow_function)])
(assignment_expression
left: (member_expression
property: (property_identifier) @function.method)
- right: [(function_expression) (arrow_function)])
+ right: [(function) (arrow_function)])
(assignment_expression
left: (member_expression
property: (private_property_identifier) @function.method.private)
- right: [(function_expression) (arrow_function)])
+ right: [(function) (arrow_function)])
(variable_declarator
name: (identifier) @function
- value: [(function_expression) (arrow_function)])
+ value: [(function) (arrow_function)])
(assignment_expression
left: (identifier) @function
- right: [(function_expression) (arrow_function)])
+ right: [(function) (arrow_function)])
; Function and method parameters
;-------------------------------
@@ -222,15 +222,12 @@
(super) @variable.builtin
[
+ (true)
+ (false)
(null)
(undefined)
] @constant.builtin
-[
- (true)
- (false)
-] @constant.builtin.boolean
-
(comment) @comment
[
@@ -238,8 +235,6 @@
(template_string)
] @string
-(escape_sequence) @constant.character.escape
-
(regex) @string.regexp
(number) @constant.numeric.integer