summaryrefslogtreecommitdiff
path: root/queries/go
diff options
context:
space:
mode:
authorJoakker <joaquinandresleon108@gmail.com>2021-06-24 14:45:31 -0400
committerStephan Seitz <stephan.lauf@yahoo.de>2021-06-25 00:22:48 +0200
commitc699cc2e47fe302e9f414356cceb20a309be5bc6 (patch)
tree961806f7baf8cc44432ffc813c71c5304907cb16 /queries/go
parent55c5620aa318a11823b5dd3d3cd69265f3763339 (diff)
Use #any-of? instead of #match? where posible
Diffstat (limited to 'queries/go')
-rw-r--r--queries/go/highlights.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/queries/go/highlights.scm b/queries/go/highlights.scm
index 7ac6fd0d..ace75b13 100644
--- a/queries/go/highlights.scm
+++ b/queries/go/highlights.scm
@@ -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