Reverse highlight precedence ordering (#9458)

Co-authored-by: postsolar <120750161+postsolar@users.noreply.github.com>
Co-authored-by: Iorvethe <58810330+Iorvethe@users.noreply.github.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: gabydd <gabydinnerdavid@gmail.com>
This commit is contained in:
Michael Davis 2025-02-02 19:17:10 -05:00 committed by GitHub
parent 382401020c
commit 5952d564d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
99 changed files with 2304 additions and 1946 deletions

View file

@ -1,3 +1,26 @@
; inherits: c
; Constants
(this) @variable.builtin
(nullptr) @constant.builtin
; Types
(using_declaration ("using" "namespace" (identifier) @namespace))
(using_declaration ("using" "namespace" (qualified_identifier name: (identifier) @namespace)))
(namespace_definition name: (namespace_identifier) @namespace)
(namespace_identifier) @namespace
(qualified_identifier name: (identifier) @type.enum.variant)
(auto) @type
"decltype" @type
(ref_qualifier ["&" "&&"] @type.builtin)
(reference_declarator ["&" "&&"] @type.builtin)
(abstract_reference_declarator ["&" "&&"] @type.builtin)
; Functions
; These casts are parsed as function calls, but are not.
@ -28,27 +51,6 @@
(function_declarator
declarator: (field_identifier) @function)
; Types
(using_declaration ("using" "namespace" (identifier) @namespace))
(using_declaration ("using" "namespace" (qualified_identifier name: (identifier) @namespace)))
(namespace_definition name: (namespace_identifier) @namespace)
(namespace_identifier) @namespace
(qualified_identifier name: (identifier) @type.enum.variant)
(auto) @type
"decltype" @type
(ref_qualifier ["&" "&&"] @type.builtin)
(reference_declarator ["&" "&&"] @type.builtin)
(abstract_reference_declarator ["&" "&&"] @type.builtin)
; Constants
(this) @variable.builtin
(nullptr) @constant.builtin
; Parameters
(parameter_declaration
@ -132,5 +134,3 @@
; Strings
(raw_string_literal) @string
; inherits: c