perf: remove match where possible

This commit is contained in:
Amaan Qureshi 2023-04-21 04:06:20 -04:00
parent 654216eb04
commit 85330918f0
37 changed files with 104 additions and 113 deletions

View file

@ -159,7 +159,7 @@
. (argument) @_transform @constant
. (argument) @variable
. (argument) @_action @constant
(#match? @_transform "TRANSFORM")
(#eq? @_transform "TRANSFORM")
(#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE")
)
(normal_command
@ -169,7 +169,7 @@
. (argument) @variable
. (argument) @_action @constant
. (argument)? @_selector @constant
(#match? @_transform "TRANSFORM")
(#eq? @_transform "TRANSFORM")
(#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE")
(#any-of? @_selector "AT" "FOR" "REGEX")
)
@ -179,8 +179,8 @@
. (argument) @_transform @constant
(argument) @constant .
(argument) @variable
(#match? @_transform "TRANSFORM")
(#match? @constant "OUTPUT_VARIABLE")
(#eq? @_transform "TRANSFORM")
(#eq? @constant "OUTPUT_VARIABLE")
)
(escape_sequence) @string.escape