From 3175d1cd97373815a6f33e5c88bcfe43af6f9f3c Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Sat, 15 Oct 2022 03:05:39 +0200 Subject: [PATCH] c/c++ highlights: *& are @type or @operator based on context (#4278) --- runtime/queries/c/highlights.scm | 3 +++ runtime/queries/cpp/highlights.scm | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm index c0f5763ac6bbb..fe5dacafed53e 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 11877a761cc0b..7bfccf72a2632 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