diff options
Diffstat (limited to 'runtime/queries/cpp/highlights.scm')
-rw-r--r-- | runtime/queries/cpp/highlights.scm | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/runtime/queries/cpp/highlights.scm b/runtime/queries/cpp/highlights.scm index 7bfccf72..8637489e 100644 --- a/runtime/queries/cpp/highlights.scm +++ b/runtime/queries/cpp/highlights.scm @@ -1,5 +1,11 @@ ; Functions +; These casts are parsed as function calls, but are not. +((identifier) @keyword (#eq? @keyword "static_cast")) +((identifier) @keyword (#eq? @keyword "dynamic_cast")) +((identifier) @keyword (#eq? @keyword "reinterpret_cast")) +((identifier) @keyword (#eq? @keyword "const_cast")) + (call_expression function: (qualified_identifier name: (identifier) @function)) @@ -63,7 +69,6 @@ "co_yield" "concept" "delete" - "final" "new" "operator" "requires" @@ -95,22 +100,27 @@ "class" "namespace" "typename" + "template" ] @keyword.storage.type [ "constexpr" "constinit" "consteval" + "mutable" +] @keyword.storage.modifier + +; Modifiers that aren't plausibly type/storage related. +[ "explicit" "friend" - "mutable" + "virtual" + (virtual_specifier) ; override/final "private" "protected" "public" - "override" - "template" - "virtual" -] @keyword.storage.modifier + "inline" ; C++ meaning differs from C! +] @keyword ; Strings |