mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 00:40:06 -04:00
Use #any-of? instead of #match? where posible
This commit is contained in:
parent
55c5620aa3
commit
c699cc2e47
9 changed files with 31 additions and 15 deletions
|
|
@ -109,13 +109,20 @@
|
|||
;; Builtin types
|
||||
|
||||
((type_identifier) @type.builtin
|
||||
(#match? @type.builtin "^(bool|byte|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$"))
|
||||
(#any-of? @type.builtin
|
||||
"bool" "byte" "complex128" "complex64" "error"
|
||||
"float32" "float64" "int" "int16" "int32" "int64"
|
||||
"int8" "rune" "string" "uint" "uint16" "uint32"
|
||||
"uint64" "uint8" "uintptr"))
|
||||
|
||||
|
||||
;; Builtin functions
|
||||
|
||||
((identifier) @function.builtin
|
||||
(#match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$"))
|
||||
(#any-of? @function.builtin
|
||||
"append" "cap" "close" "complex" "copy"
|
||||
"delete" "imag" "len" "make" "new" "panic"
|
||||
"print" "println" "real" "recover"))
|
||||
|
||||
|
||||
; Delimiters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue