mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 16:30:02 -04:00
perf: remove match where possible
This commit is contained in:
parent
654216eb04
commit
85330918f0
37 changed files with 104 additions and 113 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue