From 85330918f05b3a4bd342a69063e7ef5fcdfadd2e Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Fri, 21 Apr 2023 04:06:20 -0400 Subject: perf: remove match where possible --- queries/bash/highlights.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'queries/bash') 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 "^#!/")) -- cgit v1.2.3-70-g09d2