aboutsummaryrefslogtreecommitdiffstats
path: root/queries/bash
diff options
context:
space:
mode:
authorAmaan Qureshi <amaanq12@gmail.com>2023-04-21 04:06:20 -0400
committerAmaan Qureshi <amaanq12@gmail.com>2023-04-21 18:24:17 -0400
commit85330918f05b3a4bd342a69063e7ef5fcdfadd2e (patch)
tree6b38f8e3af9ad1079ba94ffc7056263b056d0c00 /queries/bash
parentfix(c): types are optional in sized_type_specifier (diff)
downloadnvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.gz
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.bz2
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.lz
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.xz
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.zst
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.zip
perf: remove match where possible
Diffstat (limited to 'queries/bash')
-rw-r--r--queries/bash/highlights.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/queries/bash/highlights.scm b/queries/bash/highlights.scm
index d1cdb659d..6fd1d39d5 100644
--- a/queries/bash/highlights.scm
+++ b/queries/bash/highlights.scm
@@ -84,7 +84,7 @@
(#match? @constant.builtin "^SIG(HUP|INT|QUIT|ILL|TRAP|ABRT|BUS|FPE|KILL|USR[12]|SEGV|PIPE|ALRM|TERM|STKFLT|CHLD|CONT|STOP|TSTP|TT(IN|OU)|URG|XCPU|XFSZ|VTALRM|PROF|WINCH|IO|PWR|SYS|RTMIN([+]([1-9]|1[0-5]))?|RTMAX(-([1-9]|1[0-4]))?)$"))
((word) @boolean
- (#match? @boolean "^(true|false)$"))
+ (#any-of? @boolean "true" "false"))
(comment) @comment @spell
(test_operator) @string
@@ -133,4 +133,4 @@
(regex) @string.regex
((program . (comment) @preproc)
- (#match? @preproc "^#!/"))
+ (#lua-match? @preproc "^#!/"))