From 579c9936d617ca1d7f01542a4b8000972c1ce73c Mon Sep 17 00:00:00 2001 From: Steven Sojka Date: Sat, 15 Aug 2020 09:24:24 -0500 Subject: feat(highlights): add is predicate --- queries/cpp/highlights.scm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'queries/cpp/highlights.scm') diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm index 0eb541269..fe7283136 100644 --- a/queries/cpp/highlights.scm +++ b/queries/cpp/highlights.scm @@ -8,7 +8,12 @@ (#match? @field "_$")) ; function(Foo ...foo) -(variadic_parameter_declaration) @parameter +(variadic_parameter_declaration + declarator: (variadic_declarator + (identifier) @parameter)) +; int foo = 0 +(optional_parameter_declaration + declarator: (identifier) @parameter) ;(field_expression) @parameter ;; How to highlight this? (template_function @@ -42,20 +47,20 @@ (#match? @constructor "^[A-Z]")) (call_expression - function: (scoped_identifier + function: (scoped_identifier name: (identifier) @function)) (call_expression - function: (field_expression + function: (field_expression field: (field_identifier) @function)) ((call_expression - function: (scoped_identifier + function: (scoped_identifier name: (identifier) @constructor)) (#match? @constructor "^[A-Z]")) ((call_expression - function: (field_expression + function: (field_expression field: (field_identifier) @constructor)) (#match? @constructor "^[A-Z]")) -- cgit v1.2.3-70-g09d2