summaryrefslogtreecommitdiff
path: root/queries/cpp/highlights.scm
diff options
context:
space:
mode:
authorSteven Sojka <steelsojka@users.noreply.github.com>2020-08-16 11:27:15 -0500
committerGitHub <noreply@github.com>2020-08-16 11:27:15 -0500
commit4a747aa30cc7d1ac73ebe5ac5cee97bf5fccc6d6 (patch)
tree4ef42a5f7c195784f46f1153547d8d0ec3075589 /queries/cpp/highlights.scm
parent5462027bebe29a9ee7d1aa2f2f678c81d3be1283 (diff)
parent579c9936d617ca1d7f01542a4b8000972c1ce73c (diff)
Merge pull request #296 from steelsojka/feat-is-predicate
feat(highlights): add is predicate
Diffstat (limited to 'queries/cpp/highlights.scm')
-rw-r--r--queries/cpp/highlights.scm15
1 files changed, 10 insertions, 5 deletions
diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm
index 0eb54126..fe728313 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]"))