Skip to content

Commit

Permalink
c/c++ highlights: *& are @type or @operator based on context (helix-e…
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-mccall authored and Shekhinah Memmel committed Dec 11, 2022
1 parent 795744b commit 7751962
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/queries/c/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
(preproc_directive)
] @keyword.directive

(pointer_declarator "*" @type.builtin)
(abstract_pointer_declarator "*" @type.builtin)

[
"+"
"-"
Expand Down
4 changes: 4 additions & 0 deletions runtime/queries/cpp/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7751962

Please sign in to comment.