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/clojure/highlights.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'queries/clojure') diff --git a/queries/clojure/highlights.scm b/queries/clojure/highlights.scm index a070b7ffd..69b9abd9d 100644 --- a/queries/clojure/highlights.scm +++ b/queries/clojure/highlights.scm @@ -59,28 +59,28 @@ ; Inline function variables ((sym_lit) @variable.builtin - (#match? @variable.builtin "^[%]")) + (#lua-match? @variable.builtin "^%%")) ; Constructor ((sym_lit) @constructor - (#match? @constructor "^-\\>[^\\>].*")) + (#lua-match? @constructor "^-\\>[^\\>].*")) ; Dynamic variables ((sym_lit) @variable.builtin - (#match? @variable.builtin "^[*].+[*]$")) + (#lua-match? @variable.builtin "^[*].+[*]$")) ; Gensym ;; Might not be needed ((sym_lit) @variable - (#match? @variable "^.*#$")) + (#lua-match? @variable "^.*#$")) ; Types ;; TODO: improve? ((sym_lit) @type - (#match? @type "^[A-Z][^/]*$")) + (#lua-match? @type "^[%u][^/]*$")) ;; Symbols with `.` but not `/` ((sym_lit) @type - (#match? @type "^[^/]+[.][^/]*$")) + (#lua-match? @type "^[^/]+[.][^/]*$")) ; Interop ((sym_lit) @method @@ -88,11 +88,11 @@ ((sym_lit) @field (#match? @field "^\\.-")) ((sym_lit) @field - (#match? @field "^[A-Z].*/.+")) + (#lua-match? @field "^[%u].*/.+")) (list_lit . (sym_lit) @method - (#match? @method "^[A-Z].*/.+")) + (#lua-match? @method "^[%u].*/.+")) ;; TODO: Special casing for the `.` macro ; Operators -- cgit v1.2.3-70-g09d2