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

@ -11,7 +11,7 @@
; NOTE: This query is a bit of a work around for the fact that the dart grammar doesn't
; specifically identify a node as a function call
(((identifier) @function (#match? @function "^_?[a-z]"))
(((identifier) @function (#lua-match? @function "^_?[%l]"))
. (selector . (argument_part))) @function
; Annotations
@ -100,7 +100,7 @@
((scoped_identifier
scope: (identifier) @type
name: (identifier) @type)
(#match? @type "^[a-zA-Z]"))
(#lua-match? @type "^[%u%l]"))
(type_identifier) @type
@ -113,7 +113,7 @@
(inferred_type) @keyword
((identifier) @type
(#match? @type "^_?[A-Z].*[a-z]")) ; catch Classes or IClasses not CLASSES
(#lua-match? @type "^_?[%u].*[%l]")) ; catch Classes or IClasses not CLASSES
("Function" @type)