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

@ -1,19 +1,19 @@
; Built-ins {{{
((function_call
function: (identifier) @function.builtin)
(#match? @function.builtin "^(chr|concat|exit|flush|getchar|not|ord|print|print_err|print_int|size|strcmp|streq|substring)$")
(#any-of? @function.builtin "chr" "concat" "exit" "flush" "getchar" "not" "ord" "print" "print_err" "print_int" "size" "strcmp" "streq" "substring")
; FIXME: not supported by neovim
; (#is-not? local)
)
((type_identifier) @type.builtin
(#match? @type.builtin "^(int|string|Object)$")
(#any-of? @type.builtin "int" "string" "Object")
; FIXME: not supported by neovim
; (#is-not? local)
)
((identifier) @variable.builtin
(#match? @variable.builtin "^self$")
(#eq? @variable.builtin "self")
; FIXME: not supported by neovim
; (#is-not? local)
)