From b9ed96bb6ff053d17a019cb3134c19976b87decf Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Fri, 21 Apr 2023 00:39:21 -0400 Subject: feat(c): highlight parenthesized function pointer decl identifiers as `@function` --- queries/c/highlights.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/queries/c/highlights.scm b/queries/c/highlights.scm index f607d3b8c..85001f891 100644 --- a/queries/c/highlights.scm +++ b/queries/c/highlights.scm @@ -130,7 +130,6 @@ [ (type_identifier) - (sized_type_specifier) (type_descriptor) ] @type @@ -146,6 +145,8 @@ (primitive_type) @type.builtin +(sized_type_specifier _ @type.builtin type: _) + ((identifier) @constant (#lua-match? @constant "^[A-Z][A-Z0-9_]+$")) (enumerator @@ -171,6 +172,10 @@ field: (field_identifier) @function.call)) (function_declarator declarator: (identifier) @function) +(function_declarator + declarator: (parenthesized_declarator + (pointer_declarator + declarator: (field_identifier) @function))) (preproc_function_def name: (identifier) @function.macro) -- cgit v1.3.1