Tweak SCREAMING_SNAKE_CASE regexes in highlight queries
This commit is contained in:
parent
95cb9ceac9
commit
6ecf870c66
6 changed files with 6 additions and 6 deletions
|
@ -86,7 +86,7 @@
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#match? @constant "^[A-Z][A-Z\\d_]*$"))
|
(#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
function: (identifier) @function)
|
function: (identifier) @function)
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
|
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#match? @constant "^[A-Z][A-Z\\d_]*$"))
|
(#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
|
||||||
|
|
||||||
(field_identifier) @property
|
(field_identifier) @property
|
||||||
(statement_identifier) @label
|
(statement_identifier) @label
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
(shorthand_property_identifier)
|
(shorthand_property_identifier)
|
||||||
(shorthand_property_identifier_pattern)
|
(shorthand_property_identifier_pattern)
|
||||||
] @constant
|
] @constant
|
||||||
(#match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
(#match? @constant "^_*[A-Z_][A-Z\\d_]*$"))
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
(#match? @type "^[A-Z]"))
|
(#match? @type "^[A-Z]"))
|
||||||
|
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#match? @constant "^[A-Z][A-Z_]*$"))
|
(#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
|
||||||
|
|
||||||
; Builtin functions
|
; Builtin functions
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
; Assume all-caps names are constants
|
; Assume all-caps names are constants
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
|
(#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
|
||||||
|
|
||||||
[
|
[
|
||||||
"("
|
"("
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
(shorthand_property_identifier)
|
(shorthand_property_identifier)
|
||||||
(shorthand_property_identifier_pattern)
|
(shorthand_property_identifier_pattern)
|
||||||
] @constant
|
] @constant
|
||||||
(#match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
(#match? @constant "^_*[A-Z_][A-Z\\d_]*$"))
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue