feat(c): mention how to highlight K&R functions

This commit is contained in:
Amaan Qureshi 2023-08-12 21:16:08 -04:00
parent 8fbc841df8
commit e0f4782978

View file

@ -244,6 +244,29 @@
(parameter_declaration
declarator: (pointer_declarator) @parameter)
; K&R functions
; To enable support for K&R functions,
; add the following lines to your own query config and uncomment them.
; They are commented out as they'll conflict with C++
; Note that you'll need to have `; extends` at the top of your query file.
;
; (parameter_list (identifier) @parameter)
;
; (function_definition
; declarator: _
; (declaration
; declarator: (identifier) @parameter))
;
; (function_definition
; declarator: _
; (declaration
; declarator: (array_declarator) @parameter))
;
; (function_definition
; declarator: _
; (declaration
; declarator: (pointer_declarator) @parameter))
(preproc_params (identifier) @parameter)
[