aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/cpp
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-12-24 12:52:21 +0100
committerChristian Clason <c.clason@uni-graz.at>2024-01-19 16:58:37 +0100
commit10dd49958c96f86c8247c715bd20a6681afc1d8b (patch)
tree511849caff160e818f4dd08a6106137dcadb620d /tests/query/highlights/cpp
parentfeat(injections): add printf format strings (diff)
downloadnvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.gz
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.bz2
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.lz
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.xz
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.zst
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.zip
chore(tests): consistent captures
Diffstat (limited to 'tests/query/highlights/cpp')
-rw-r--r--tests/query/highlights/cpp/concepts.cpp12
-rw-r--r--tests/query/highlights/cpp/test.cpp20
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
}