highlights(ecma): Update queries for literals

- Add queries for value properties:
    - undefined
    - NaN
    - Infinity
- Highlight regex delimiters as brackets instead of punctuation
- Format queries for literals
This commit is contained in:
Sergio Alejandro Vargas 2022-08-18 22:36:22 -05:00 committed by Stephan Seitz
parent 4b536a9709
commit fb6d60c7b9

View file

@ -97,22 +97,35 @@
; Literals
;---------
(this) @variable.builtin
(super) @variable.builtin
(true) @boolean
(false) @boolean
(null) @constant.builtin
[
(comment)
(hash_bang_line)
(this)
(super)
] @variable.builtin
[
(true)
(false)
] @boolean
[
(null)
(undefined)
] @constant.builtin
[
(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
;------------