mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 00:40:06 -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
|
|
@ -81,7 +81,7 @@
|
|||
(
|
||||
(command_expression
|
||||
command: (identifier) @keyword.return)
|
||||
(#match? @keyword.return "^[rR][eE][tT][uU][rR][nN]$")
|
||||
(#lua-match? @keyword.return "^[rR][eE][tT][uU][rR][nN]$")
|
||||
)
|
||||
|
||||
; Subroutine calls
|
||||
|
|
@ -97,14 +97,14 @@
|
|||
(identifier) @constant)
|
||||
(
|
||||
(argument_list (identifier) @constant.builtin)
|
||||
(#match? @constant.builtin "^[%/][a-zA-Z][a-zA-Z0-9.]*$")
|
||||
(#lua-match? @constant.builtin "^[%%/][%l%u][%l%u%d.]*$")
|
||||
)
|
||||
|
||||
(
|
||||
(command_expression
|
||||
command: (identifier) @keyword
|
||||
arguments: (argument_list . (identifier) @label))
|
||||
(#match? @keyword "^[gG][oO][tT][oO]$")
|
||||
(#lua-match? @keyword "^[gG][oO][tT][oO]$")
|
||||
)
|
||||
(labeled_expression
|
||||
label: (identifier) @label)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue