feat(c): highlight parenthesized function pointer decl identifiers as @function

This commit is contained in:
Amaan Qureshi 2023-04-21 00:39:21 -04:00
parent b0338a0565
commit b9ed96bb6f

View file

@ -130,7 +130,6 @@
[ [
(type_identifier) (type_identifier)
(sized_type_specifier)
(type_descriptor) (type_descriptor)
] @type ] @type
@ -146,6 +145,8 @@
(primitive_type) @type.builtin (primitive_type) @type.builtin
(sized_type_specifier _ @type.builtin type: _)
((identifier) @constant ((identifier) @constant
(#lua-match? @constant "^[A-Z][A-Z0-9_]+$")) (#lua-match? @constant "^[A-Z][A-Z0-9_]+$"))
(enumerator (enumerator
@ -171,6 +172,10 @@
field: (field_identifier) @function.call)) field: (field_identifier) @function.call))
(function_declarator (function_declarator
declarator: (identifier) @function) declarator: (identifier) @function)
(function_declarator
declarator: (parenthesized_declarator
(pointer_declarator
declarator: (field_identifier) @function)))
(preproc_function_def (preproc_function_def
name: (identifier) @function.macro) name: (identifier) @function.macro)