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 pathwave committed Oct 16, 2022
1 parent 85dbd9b commit 3175d1c
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 3175d1c

Please sign in to comment.