From 011ac894ec5b9e36563d8629fb7734f43ddb27a8 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 18 Nov 2021 09:51:03 +0000 Subject: Prefer lua-match over match as string.find is much quicker than vim.regex:match* --- queries/cpp/highlights.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'queries/cpp') diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm index 309f72d93..c860b632a 100644 --- a/queries/cpp/highlights.scm +++ b/queries/cpp/highlights.scm @@ -33,9 +33,9 @@ (namespace_identifier) @namespace ((namespace_identifier) @type - (#match? @type "^[A-Z]")) + (#lua-match? @type "^[A-Z]")) ((namespace_identifier) @constant - (#match? @constant "^[A-Z][A-Z_0-9]*$")) + (#lua-match? @constant "^[A-Z][A-Z_0-9]*$")) (namespace_definition name: (identifier) @namespace) @@ -50,7 +50,7 @@ ((function_declarator declarator: (qualified_identifier name: (identifier) @constructor)) - (#match? @constructor "^[A-Z]")) + (#lua-match? @constructor "^[A-Z]")) (operator_name) @function "static_assert" @function.builtin @@ -65,22 +65,22 @@ ((call_expression function: (identifier) @constructor) -(#match? @constructor "^[A-Z]")) +(#lua-match? @constructor "^[A-Z]")) ((call_expression function: (qualified_identifier name: (identifier) @constructor)) -(#match? @constructor "^[A-Z]")) +(#lua-match? @constructor "^[A-Z]")) ((call_expression function: (field_expression field: (field_identifier) @constructor)) -(#match? @constructor "^[A-Z]")) +(#lua-match? @constructor "^[A-Z]")) ;; constructing a type in an initializer list: Constructor (): **SuperType (1)** ((field_initializer (field_identifier) @constructor (argument_list)) - (#match? @constructor "^[A-Z]")) + (#lua-match? @constructor "^[A-Z]")) ; Constants -- cgit v1.2.3-70-g09d2