diff options
Diffstat (limited to 'tests/query/highlights/cpp')
| -rw-r--r-- | tests/query/highlights/cpp/concepts.cpp | 12 | ||||
| -rw-r--r-- | tests/query/highlights/cpp/test.cpp | 20 |
2 files changed, 16 insertions, 16 deletions
diff --git a/tests/query/highlights/cpp/concepts.cpp b/tests/query/highlights/cpp/concepts.cpp index 27aed7a70..6fe6af436 100644 --- a/tests/query/highlights/cpp/concepts.cpp +++ b/tests/query/highlights/cpp/concepts.cpp @@ -1,14 +1,14 @@ template <class T, class U> concept Derived = std::is_base_of<U, T>::value; -// ^ keyword -// ^ type.definition +// ^ @keyword +// ^ @type.definition template<typename T> concept Hashable = requires(T a) { -// ^ keyword -// ^ parameter -// ^ type +// ^ @keyword +// ^ @parameter +// ^ @type { std::hash<T>{}(a) } -> std::convertible_to<std::size_t>; typename CommonType<T, U>; // CommonType<T, U> is valid and names a type { CommonType<T, U>{std::forward<T>(t)} }; @@ -18,5 +18,5 @@ concept Hashable = requires(T a) { template<typename T> requires requires (T x) { x + x; } // ad-hoc constraint, note keyword used twice -// ^ keyword +// ^ @keyword T add(T a, T b) { return a + b; } diff --git a/tests/query/highlights/cpp/test.cpp b/tests/query/highlights/cpp/test.cpp index 77e3be698..3f903a55f 100644 --- a/tests/query/highlights/cpp/test.cpp +++ b/tests/query/highlights/cpp/test.cpp @@ -1,19 +1,19 @@ #include <iostream> #include <cstdlib> -// ^ include -// ^ string +// ^ @include +// ^ @string auto main( int argc, char** argv ) -> int -// ^ type.builtin - // ^ parameter - // ^ type.builtin - // ^ type.builtin - // ^ operator +// ^ @type.builtin + // ^ @parameter + // ^ @type.builtin + // ^ @type.builtin + // ^ @operator { std::cout << "Hello world!" << std::endl; - // ^ punctuation.delimiter + // ^ @punctuation.delimiter return EXIT_SUCCESS; - // ^ keyword.return - // ^ constant + // ^ @keyword.return + // ^ @constant } |
