diff --git a/languages.toml b/languages.toml index def55182d4fc..1735ee3f3b7f 100644 --- a/languages.toml +++ b/languages.toml @@ -184,7 +184,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote [[grammar]] name = "c" -source = { git = "https://github.com/tree-sitter/tree-sitter-c", rev = "f05e279aedde06a25801c3f2b2cc8ac17fac52ae" } +source = { git = "https://github.com/tree-sitter/tree-sitter-c", rev = "7175a6dd5fc1cee660dce6fe23f6043d75af424a" } [[language]] name = "cpp" @@ -221,7 +221,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote [[grammar]] name = "cpp" -source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "e8dcc9d2b404c542fd236ea5f7208f90be8a6e89" } +source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "d5e90fba898f320db48d81ddedd78d52c67c1fed" } [[language]] name = "c-sharp" diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm index 647df05ddba7..3704e18a0f48 100644 --- a/runtime/queries/c/highlights.scm +++ b/runtime/queries/c/highlights.scm @@ -77,6 +77,9 @@ declarator: (identifier) @function) (preproc_function_def name: (identifier) @function.special) + +(attribute + name: (identifier) @attribute) (field_identifier) @variable.other.member (statement_identifier) @label diff --git a/runtime/queries/cpp/highlights.scm b/runtime/queries/cpp/highlights.scm index 3348ef3caec2..4bbc072f0c16 100644 --- a/runtime/queries/cpp/highlights.scm +++ b/runtime/queries/cpp/highlights.scm @@ -42,7 +42,10 @@ "catch" @keyword "class" @keyword +"concept" @keyword +"consteval" @keyword "constexpr" @keyword +"constinit" @keyword "delete" @keyword "explicit" @keyword "final" @keyword @@ -55,6 +58,7 @@ "private" @keyword "protected" @keyword "public" @keyword +"requires" @keyword "template" @keyword "throw" @keyword "try" @keyword @@ -62,6 +66,20 @@ "using" @keyword "virtual" @keyword +; Operators +"<=>" @operator +[ + "or" + "and" + "bitor" + "xor" + "bitand" + "not_eq" + "and_eq" + "or_eq" + "xor_eq" +] @keyword.operator + ; Strings (raw_string_literal) @string