diff --git a/queries/c/highlights.scm b/queries/c/highlights.scm index 29fb5747c..4acdaed99 100644 --- a/queries/c/highlights.scm +++ b/queries/c/highlights.scm @@ -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) [