aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorSam McCall2022-10-15 01:05:39 +0000
committerGitHub2022-10-15 01:05:39 +0000
commita3ed9169df8d0a56ab4f698d2c90e7e6b4404633 (patch)
tree0f2b0008c1fd248abe7d79dae19f83d92b73be9f /runtime
parent45e038f4d5be367388b451a5d182b5643c04621d (diff)
c/c++ highlights: *& are @type or @operator based on context (#4278)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/c/highlights.scm3
-rw-r--r--runtime/queries/cpp/highlights.scm4
2 files changed, 7 insertions, 0 deletions
diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm
index c0f5763a..fe5dacaf 100644
--- a/runtime/queries/c/highlights.scm
+++ b/runtime/queries/c/highlights.scm
@@ -51,6 +51,9 @@
(preproc_directive)
] @keyword.directive
+(pointer_declarator "*" @type.builtin)
+(abstract_pointer_declarator "*" @type.builtin)
+
[
"+"
"-"
diff --git a/runtime/queries/cpp/highlights.scm b/runtime/queries/cpp/highlights.scm
index 11877a76..7bfccf72 100644
--- a/runtime/queries/cpp/highlights.scm
+++ b/runtime/queries/cpp/highlights.scm
@@ -34,6 +34,10 @@
(auto) @type
"decltype" @type
+(ref_qualifier ["&" "&&"] @type.builtin)
+(reference_declarator ["&" "&&"] @type.builtin)
+(abstract_reference_declarator ["&" "&&"] @type.builtin)
+
; Constants
(this) @variable.builtin