aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--queries/ecma/highlights.scm31
1 files changed, 22 insertions, 9 deletions
diff --git a/queries/ecma/highlights.scm b/queries/ecma/highlights.scm
index c5baa3112..1240dd4be 100644
--- a/queries/ecma/highlights.scm
+++ b/queries/ecma/highlights.scm
@@ -97,22 +97,35 @@
; Literals
;---------
-(this) @variable.builtin
-(super) @variable.builtin
+[
+ (this)
+ (super)
+] @variable.builtin
+
+[
+ (true)
+ (false)
+] @boolean
+
+[
+ (null)
+ (undefined)
+] @constant.builtin
-(true) @boolean
-(false) @boolean
-(null) @constant.builtin
[
-(comment)
-(hash_bang_line)
+ (comment)
+ (hash_bang_line)
] @comment
+
(string) @string
-(regex) @punctuation.delimiter
-(regex_pattern) @string.regex
(template_string) @string
(escape_sequence) @string.escape
+(regex_pattern) @string.regex
+(regex "/" @punctuation.bracket) ; Regex delimiters
+
(number) @number
+((identifier) @number
+ (#any-of? @number "NaN" "Infinity"))
; Punctuation
;------------