aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/gleam
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/gleam
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/gleam')
-rw-r--r--tests/query/highlights/gleam/assert.gleam20
-rw-r--r--tests/query/highlights/gleam/function.gleam214
-rw-r--r--tests/query/highlights/gleam/import.gleam34
-rw-r--r--tests/query/highlights/gleam/pipe.gleam26
-rw-r--r--tests/query/highlights/gleam/todo.gleam8
-rw-r--r--tests/query/highlights/gleam/type.gleam128
6 files changed, 215 insertions, 215 deletions
diff --git a/tests/query/highlights/gleam/assert.gleam b/tests/query/highlights/gleam/assert.gleam
index 3711339bb..d36716a3f 100644
--- a/tests/query/highlights/gleam/assert.gleam
+++ b/tests/query/highlights/gleam/assert.gleam
@@ -1,13 +1,13 @@
pub fn main() {
assert Ok(i) = parse_int("123")
- // <- exception
- // ^^ constructor
- // ^ punctuation.bracket
- // ^ variable
- // ^ punctuation.bracket
- // ^ operator
- // ^^^^^^^^^ function.call
- // ^ punctuation.bracket
- // ^^^^^ string
- // ^ punctuation.bracket
+ // <- @exception
+ // ^^ @constructor
+ // ^ @punctuation.bracket
+ // ^ @variable
+ // ^ @punctuation.bracket
+ // ^ @operator
+ // ^^^^^^^^^ @function.call
+ // ^ @punctuation.bracket
+ // ^^^^^ @string
+ // ^ @punctuation.bracket
}
diff --git a/tests/query/highlights/gleam/function.gleam b/tests/query/highlights/gleam/function.gleam
index cf2fbf969..aed4879dc 100644
--- a/tests/query/highlights/gleam/function.gleam
+++ b/tests/query/highlights/gleam/function.gleam
@@ -1,127 +1,127 @@
pub fn add(x: Int, y: Int) -> Int {
-// <- type.qualifier
-// ^^ keyword.function
-// ^^^ function
-// ^ punctuation.bracket
-// ^ parameter
-// ^ punctuation.delimiter
-// ^^^ type.builtin
-// ^ punctuation.delimiter
-// ^ parameter
-// ^ punctuation.delimiter
-// ^^^ type.builtin
-// ^ punctuation.bracket
-// ^ punctuation.delimiter
-// ^^^ type.builtin
-// ^ punctuation.bracket
+// <- @type.qualifier
+// ^^ @keyword.function
+// ^^^ @function
+// ^ @punctuation.bracket
+// ^ @parameter
+// ^ @punctuation.delimiter
+// ^^^ @type.builtin
+// ^ @punctuation.delimiter
+// ^ @parameter
+// ^ @punctuation.delimiter
+// ^^^ @type.builtin
+// ^ @punctuation.bracket
+// ^ @punctuation.delimiter
+// ^^^ @type.builtin
+// ^ @punctuation.bracket
}
-// <- punctuation.bracket
+// <- @punctuation.bracket
pub fn twice(f: fn(t) -> t, x: t) -> t {
-// <- type.qualifier
-// ^ keyword.function
-// ^^^^^ function
-// ^ punctuation.bracket
-// ^ parameter
-// ^ punctuation.delimiter
-// ^^ keyword.function
-// ^ punctuation.bracket
-// ^ type
-// ^ punctuation.bracket
-// ^^ punctuation.delimiter
-// ^ type
-// ^ punctuation.delimiter
-// ^ parameter
-// ^ punctuation.delimiter
-// ^ type
-// ^ punctuation.bracket
-// ^^ punctuation.delimiter
-// ^ type
-// ^ punctuation.bracket
+// <- @type.qualifier
+// ^ @keyword.function
+// ^^^^^ @function
+// ^ @punctuation.bracket
+// ^ @parameter
+// ^ @punctuation.delimiter
+// ^^ @keyword.function
+// ^ @punctuation.bracket
+// ^ @type
+// ^ @punctuation.bracket
+// ^^ @punctuation.delimiter
+// ^ @type
+// ^ @punctuation.delimiter
+// ^ @parameter
+// ^ @punctuation.delimiter
+// ^ @type
+// ^ @punctuation.bracket
+// ^^ @punctuation.delimiter
+// ^ @type
+// ^ @punctuation.bracket
}
-// <- punctuation.bracket
+// <- @punctuation.bracket
fn list_of_two(my_value: a) -> List(a) {
-// <- keyword.function
-// ^ function
-// ^ punctuation.bracket
-// ^ parameter
-// ^ punctuation.delimiter
-// ^ type
-// ^ punctuation.bracket
-// ^ punctuation.delimiter
-// ^^^^ type.builtin
-// ^ punctuation.bracket
-// ^ type
-// ^ punctuation.bracket
-// ^ punctuation.bracket
+// <- @keyword.function
+// ^ @function
+// ^ @punctuation.bracket
+// ^ @parameter
+// ^ @punctuation.delimiter
+// ^ @type
+// ^ @punctuation.bracket
+// ^ @punctuation.delimiter
+// ^^^^ @type.builtin
+// ^ @punctuation.bracket
+// ^ @type
+// ^ @punctuation.bracket
+// ^ @punctuation.bracket
}
-// <- punctuation.bracket
+// <- @punctuation.bracket
fn replace(
-// <- keyword.function
-// ^^^^^^^ function
-// ^ punctuation.bracket
+// <- @keyword.function
+// ^^^^^^^ @function
+// ^ @punctuation.bracket
in string: String,
- // <- label
- // ^^^^^^ parameter
- // ^ punctuation.delimiter
- // ^^^^^^ type.builtin
- // ^ punctuation.delimiter
+ // <- @label
+ // ^^^^^^ @parameter
+ // ^ @punctuation.delimiter
+ // ^^^^^^ @type.builtin
+ // ^ @punctuation.delimiter
each pattern: String,
- // <- label
- // ^^^^^^^ parameter
- // ^ punctuation.delimiter
- // ^^^^^^ type.builtin
- // ^ punctuation.delimiter
+ // <- @label
+ // ^^^^^^^ @parameter
+ // ^ @punctuation.delimiter
+ // ^^^^^^ @type.builtin
+ // ^ @punctuation.delimiter
with replacement: String,
- // <- label
- // ^^^^^^^^^^^ parameter
- // ^ punctuation.delimiter
- // ^^^^^^ type.builtin
- // ^ punctuation.delimiter
+ // <- @label
+ // ^^^^^^^^^^^ @parameter
+ // ^ @punctuation.delimiter
+ // ^^^^^^ @type.builtin
+ // ^ @punctuation.delimiter
) {
replace(in: "A,B,C", each: ",", with: " ")
- // <- function.call
- // ^ punctuation.bracket
- // ^^ label
- // ^ punctuation.delimiter
- // ^^^^^^^ string
- // ^ punctuation.delimiter
- // ^^^^ label
- // ^ punctuation.delimiter
- // ^^^ string
- // ^ punctuation.delimiter
- // ^^^^ label
- // ^ punctuation.delimiter
- // ^^^ string
- // ^ punctuation.bracket
+ // <- @function.call
+ // ^ @punctuation.bracket
+ // ^^ @label
+ // ^ @punctuation.delimiter
+ // ^^^^^^^ @string
+ // ^ @punctuation.delimiter
+ // ^^^^ @label
+ // ^ @punctuation.delimiter
+ // ^^^ @string
+ // ^ @punctuation.delimiter
+ // ^^^^ @label
+ // ^ @punctuation.delimiter
+ // ^^^ @string
+ // ^ @punctuation.bracket
}
-// <- punctuation.bracket
+// <- @punctuation.bracket
pub external fn random_float() -> Float = "rand" "uniform"
-// <- type.qualifier
-// ^^^^^^^^ type.qualifier
-// ^^ keyword.function
-// ^^^^^^^^^^^^ function
-// ^ punctuation.bracket
-// ^ punctuation.bracket
-// ^^ punctuation.delimiter
-// ^^^^^ type.builtin
-// ^ operator
-// ^^^^^^ namespace
-// ^^^^^^^^^ function
+// <- @type.qualifier
+// ^^^^^^^^ @type.qualifier
+// ^^ @keyword.function
+// ^^^^^^^^^^^^ @function
+// ^ @punctuation.bracket
+// ^ @punctuation.bracket
+// ^^ @punctuation.delimiter
+// ^^^^^ @type.builtin
+// ^ @operator
+// ^^^^^^ @namespace
+// ^^^^^^^^^ @function
pub external fn inspect(a) -> a = "Elixir.IO" "inspect"
-// <- type.qualifier
-// ^^^^^^^^ type.qualifier
-// ^^ keyword.function
-// ^^^^^^^ function
-// ^ punctuation.bracket
-// ^ type
-// ^ punctuation.bracket
-// ^^ punctuation.delimiter
-// ^ type
-// ^ operator
-// ^^^^^^^^^^^ namespace
-// ^^^^^^^^^ function
+// <- @type.qualifier
+// ^^^^^^^^ @type.qualifier
+// ^^ @keyword.function
+// ^^^^^^^ @function
+// ^ @punctuation.bracket
+// ^ @type
+// ^ @punctuation.bracket
+// ^^ @punctuation.delimiter
+// ^ @type
+// ^ @operator
+// ^^^^^^^^^^^ @namespace
+// ^^^^^^^^^ @function
diff --git a/tests/query/highlights/gleam/import.gleam b/tests/query/highlights/gleam/import.gleam
index c48b38199..3ee141513 100644
--- a/tests/query/highlights/gleam/import.gleam
+++ b/tests/query/highlights/gleam/import.gleam
@@ -1,22 +1,22 @@
import gleam/io
-// <- include
-// ^ namespace
-// ^ operator
-// ^ namespace
+// <- @include
+// ^ @namespace
+// ^ @operator
+// ^ @namespace
import cat as kitten
-// <- include
-// ^ namespace
-// ^ keyword
-// ^ namespace
+// <- @include
+// ^ @namespace
+// ^ @keyword
+// ^ @namespace
import animal/cat.{Cat, stroke}
-// <- include
-// ^ namespace
-// ^ operator
-// ^ punctuation.delimiter
-// ^ punctuation.bracket
-// ^^^ type
-// ^ punctuation.delimiter
-// ^^^^^^ function
-// ^ punctuation.bracket
+// <- @include
+// ^ @namespace
+// ^ @operator
+// ^ @punctuation.delimiter
+// ^ @punctuation.bracket
+// ^^^ @type
+// ^ @punctuation.delimiter
+// ^^^^^^ @function
+// ^ @punctuation.bracket
diff --git a/tests/query/highlights/gleam/pipe.gleam b/tests/query/highlights/gleam/pipe.gleam
index d0341217b..c696b0227 100644
--- a/tests/query/highlights/gleam/pipe.gleam
+++ b/tests/query/highlights/gleam/pipe.gleam
@@ -1,18 +1,18 @@
pub fn run() {
1
- // <- number
+ // <- @number
|> add(_, 2)
- // <- operator
- // ^^^ function.call
- // ^ punctuation.bracket
- // ^ comment
- // ^ punctuation.delimiter
- // ^ number
- // ^ punctuation.bracket
+ // <- @operator
+ // ^^^ @function.call
+ // ^ @punctuation.bracket
+ // ^ @comment
+ // ^ @punctuation.delimiter
+ // ^ @number
+ // ^ @punctuation.bracket
|> add(3)
- // <- operator
- // ^^^ function.call
- // ^ punctuation.bracket
- // ^ number
- // ^ punctuation.bracket
+ // <- @operator
+ // ^^^ @function.call
+ // ^ @punctuation.bracket
+ // ^ @number
+ // ^ @punctuation.bracket
}
diff --git a/tests/query/highlights/gleam/todo.gleam b/tests/query/highlights/gleam/todo.gleam
index 27038bb73..b7384ecbd 100644
--- a/tests/query/highlights/gleam/todo.gleam
+++ b/tests/query/highlights/gleam/todo.gleam
@@ -1,7 +1,7 @@
fn favourite_number() -> Int {
todo("We're going to decide which number is best tomorrow")
- // <- keyword
- // ^ punctuation.bracket
- // ^ string
- // ^ punctuation.bracket
+ // <- @keyword
+ // ^ @punctuation.bracket
+ // ^ @string
+ // ^ @punctuation.bracket
}
diff --git a/tests/query/highlights/gleam/type.gleam b/tests/query/highlights/gleam/type.gleam
index b44aceadc..0905e1ea4 100644
--- a/tests/query/highlights/gleam/type.gleam
+++ b/tests/query/highlights/gleam/type.gleam
@@ -1,84 +1,84 @@
pub type Cat {
-// <- type.qualifier
-// ^^^^ keyword
-// ^^^ type
-// ^ punctuation.bracket
+// <- @type.qualifier
+// ^^^^ @keyword
+// ^^^ @type
+// ^ @punctuation.bracket
Cat(name: String, cuteness: Int)
- // <- constructor
- // ^ punctuation.bracket
- // ^^^^ property
- // ^ punctuation.delimiter
- // ^^^^^^ type.builtin
- // ^ punctuation.delimiter
- // ^^^^^^^^ property
- // ^ punctuation.delimiter
- // ^^^ type.builtin
- // ^ punctuation.bracket
+ // <- @constructor
+ // ^ @punctuation.bracket
+ // ^^^^ @property
+ // ^ @punctuation.delimiter
+ // ^^^^^^ @type.builtin
+ // ^ @punctuation.delimiter
+ // ^^^^^^^^ @property
+ // ^ @punctuation.delimiter
+ // ^^^ @type.builtin
+ // ^ @punctuation.bracket
}
fn cats() {
Cat(name: "Nubi", cuteness: 2001)
- // <- type
- // ^ punctuation.bracket
- // ^^^^ property
- // ^ punctuation.delimiter
- // ^^^^^^ string
- // ^ punctuation.delimiter
- // ^^^^^^^^ property
- // ^ punctuation.delimiter
- // ^^^^ number
- // ^ punctuation.bracket
+ // <- @type
+ // ^ @punctuation.bracket
+ // ^^^^ @property
+ // ^ @punctuation.delimiter
+ // ^^^^^^ @string
+ // ^ @punctuation.delimiter
+ // ^^^^^^^^ @property
+ // ^ @punctuation.delimiter
+ // ^^^^ @number
+ // ^ @punctuation.bracket
Cat("Ginny", 1950)
- // <- constructor
- // ^ punctuation.bracket
- // ^^^^^^^ string
- // ^ punctuation.delimiter
- // ^^^^ number
- // ^ punctuation.bracket
+ // <- @constructor
+ // ^ @punctuation.bracket
+ // ^^^^^^^ @string
+ // ^ @punctuation.delimiter
+ // ^^^^ @number
+ // ^ @punctuation.bracket
}
type Box(inner_type) {
-// <- keyword
-// ^^^ type
-// ^ punctuation.bracket
-// ^^^^^^^^^^ type
-// ^ punctuation.bracket
-// ^ punctuation.bracket
+// <- @keyword
+// ^^^ @type
+// ^ @punctuation.bracket
+// ^^^^^^^^^^ @type
+// ^ @punctuation.bracket
+// ^ @punctuation.bracket
Box(inner: inner_type)
- // <- constructor
- // ^ punctuation.bracket
- // ^^^^^ property
- // ^ punctuation.delimiter
- // ^^^^^^^^^^ type
- // ^ punctuation.bracket
+ // <- @constructor
+ // ^ @punctuation.bracket
+ // ^^^^^ @property
+ // ^ @punctuation.delimiter
+ // ^^^^^^^^^^ @type
+ // ^ @punctuation.bracket
}
pub opaque type Counter {
-// <- type.qualifier
-// ^^^^^^ type.qualifier
-// ^^^^ keyword
-// ^^^^^^^ type
-// ^ punctuation.bracket
+// <- @type.qualifier
+// ^^^^^^ @type.qualifier
+// ^^^^ @keyword
+// ^^^^^^^ @type
+// ^ @punctuation.bracket
Counter(value: Int)
}
pub fn have_birthday(person) {
Person(..person, age: person.age + 1, is_happy: True)
- // <- constructor
- // ^ punctuation.bracket
- // ^^ operator
- // ^^^^^^ variable
- // ^ punctuation.delimiter
- // ^^^ property
- // ^ punctuation.delimiter
- // ^^^^^^ variable
- // ^ punctuation.delimiter
- // ^^^ property
- // ^ operator
- // ^ number
- // ^ punctuation.delimiter
- // ^^^^^^^^ property
- // ^ punctuation.delimiter
- // ^^^^ boolean
- // ^ punctuation.bracket
+ // <- @constructor
+ // ^ @punctuation.bracket
+ // ^^ @operator
+ // ^^^^^^ @variable
+ // ^ @punctuation.delimiter
+ // ^^^ @property
+ // ^ @punctuation.delimiter
+ // ^^^^^^ @variable
+ // ^ @punctuation.delimiter
+ // ^^^ @property
+ // ^ @operator
+ // ^ @number
+ // ^ @punctuation.delimiter
+ // ^^^^^^^^ @property
+ // ^ @punctuation.delimiter
+ // ^^^^ @boolean
+ // ^ @punctuation.bracket
}