From 63c1853674f8f6c81bc8883383ad550499410568 Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Sat, 4 Jul 2020 22:00:59 +0200 Subject: C/C++ highlights: update to new syntax This changed the highlight of "switch" to conditional and of "break" to repeat. --- queries/cpp/highlights.scm | 51 ++++++++++++++++++++++++++-------------------- queries/cpp/locals.scm | 4 ++-- 2 files changed, 31 insertions(+), 24 deletions(-) (limited to 'queries/cpp') diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm index 0d8295a1d..49382bdf7 100644 --- a/queries/cpp/highlights.scm +++ b/queries/cpp/highlights.scm @@ -60,7 +60,6 @@ (argument_list)) (#match? @constructor "^[A-Z]")) -(auto) @keyword ; Constants @@ -72,25 +71,33 @@ ; Keywords -"catch" @exception -"class" @keyword -"constexpr" @keyword -"delete" @keyword -"explicit" @keyword -"final" @exception -"friend" @keyword -"mutable" @keyword -"namespace" @keyword -"noexcept" @keyword -"new" @keyword -"override" @keyword -"private" @keyword -"protected" @keyword -"public" @keyword -"template" @keyword -"throw" @keyword -"try" @exception -"typename" @keyword -"using" @keyword -"virtual" @keyword +[ + "try" + "catch" + "noexcept" + "throw" +] @exception + + +[ + "class" + "constexpr" + "delete" + "explicit" + "final" + "friend" + "mutable" + "namespace" + "new" + "override" + "private" + "protected" + "public" + "template" + "typename" + "using" + "virtual" + (auto) +] @keyword + "::" @operator diff --git a/queries/cpp/locals.scm b/queries/cpp/locals.scm index e2e32a140..47b69c866 100644 --- a/queries/cpp/locals.scm +++ b/queries/cpp/locals.scm @@ -11,14 +11,14 @@ (struct_specifier name: (scoped_type_identifier - name: (type_identifier) @definition.type) ) + name: (type_identifier) @definition.type)) (class_specifier name: (type_identifier) @definition.type) (class_specifier name: (scoped_type_identifier - name: (type_identifier) @definition.type) ) + name: (type_identifier) @definition.type)) ;; Function defintions (template_function -- cgit v1.2.3-70-g09d2