diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-08 21:40:09 -0500 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-10 02:41:45 -0500 |
| commit | 4a4c475617b6c6cbf5ddbc26558a695b11474040 (patch) | |
| tree | e94d1fca05e55c5ccf664da8be3ae9ed27ce9bf1 /tests | |
| parent | fix(gleam): update highlights from upstream (diff) | |
| download | nvim-treesitter-4a4c475617b6c6cbf5ddbc26558a695b11474040.tar nvim-treesitter-4a4c475617b6c6cbf5ddbc26558a695b11474040.tar.gz nvim-treesitter-4a4c475617b6c6cbf5ddbc26558a695b11474040.tar.bz2 nvim-treesitter-4a4c475617b6c6cbf5ddbc26558a695b11474040.tar.lz nvim-treesitter-4a4c475617b6c6cbf5ddbc26558a695b11474040.tar.xz nvim-treesitter-4a4c475617b6c6cbf5ddbc26558a695b11474040.tar.zst nvim-treesitter-4a4c475617b6c6cbf5ddbc26558a695b11474040.zip | |
fix(gleam): update tests reflecting recent changes
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/query/highlights/gleam/assert.gleam | 6 | ||||
| -rw-r--r-- | tests/query/highlights/gleam/function.gleam | 106 | ||||
| -rw-r--r-- | tests/query/highlights/gleam/import.gleam | 8 | ||||
| -rw-r--r-- | tests/query/highlights/gleam/pipe.gleam | 4 | ||||
| -rw-r--r-- | tests/query/highlights/gleam/try.gleam | 4 | ||||
| -rw-r--r-- | tests/query/highlights/gleam/type.gleam | 77 |
6 files changed, 103 insertions, 102 deletions
diff --git a/tests/query/highlights/gleam/assert.gleam b/tests/query/highlights/gleam/assert.gleam index e49b3d2c4..3711339bb 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 - // ^ type + // ^^ constructor // ^ punctuation.bracket // ^ variable // ^ punctuation.bracket // ^ operator - // ^ function + // ^^^^^^^^^ function.call // ^ punctuation.bracket - // ^ string + // ^^^^^ string // ^ punctuation.bracket } diff --git a/tests/query/highlights/gleam/function.gleam b/tests/query/highlights/gleam/function.gleam index bc69ec620..cf2fbf969 100644 --- a/tests/query/highlights/gleam/function.gleam +++ b/tests/query/highlights/gleam/function.gleam @@ -1,18 +1,18 @@ pub fn add(x: Int, y: Int) -> Int { // <- type.qualifier -// ^ keyword.function -// ^ function +// ^^ keyword.function +// ^^^ function // ^ punctuation.bracket // ^ parameter -// ^ parameter -// ^ type +// ^ punctuation.delimiter +// ^^^ type.builtin // ^ punctuation.delimiter // ^ parameter -// ^ parameter -// ^ type +// ^ punctuation.delimiter +// ^^^ type.builtin // ^ punctuation.bracket -// ^ operator -// ^ type +// ^ punctuation.delimiter +// ^^^ type.builtin // ^ punctuation.bracket } // <- punctuation.bracket @@ -20,22 +20,22 @@ pub fn add(x: Int, y: Int) -> Int { pub fn twice(f: fn(t) -> t, x: t) -> t { // <- type.qualifier // ^ keyword.function -// ^ function +// ^^^^^ function // ^ punctuation.bracket // ^ parameter -// ^ parameter -// ^ keyword.function +// ^ punctuation.delimiter +// ^^ keyword.function // ^ punctuation.bracket // ^ type // ^ punctuation.bracket -// ^ operator +// ^^ punctuation.delimiter // ^ type // ^ punctuation.delimiter // ^ parameter -// ^ parameter +// ^ punctuation.delimiter // ^ type // ^ punctuation.bracket -// ^ operator +// ^^ punctuation.delimiter // ^ type // ^ punctuation.bracket } @@ -46,11 +46,11 @@ fn list_of_two(my_value: a) -> List(a) { // ^ function // ^ punctuation.bracket // ^ parameter -// ^ parameter +// ^ punctuation.delimiter // ^ type // ^ punctuation.bracket -// ^ operator -// ^ type +// ^ punctuation.delimiter +// ^^^^ type.builtin // ^ punctuation.bracket // ^ type // ^ punctuation.bracket @@ -60,68 +60,68 @@ fn list_of_two(my_value: a) -> List(a) { fn replace( // <- keyword.function -// ^ function +// ^^^^^^^ function // ^ punctuation.bracket in string: String, - // <- symbol - // ^ parameter - // ^ parameter - // ^ type + // <- label + // ^^^^^^ parameter + // ^ punctuation.delimiter + // ^^^^^^ type.builtin // ^ punctuation.delimiter each pattern: String, - // <- symbol - // ^ parameter - // ^ parameter - // ^ type + // <- label + // ^^^^^^^ parameter + // ^ punctuation.delimiter + // ^^^^^^ type.builtin // ^ punctuation.delimiter with replacement: String, - // <- symbol - // ^ parameter - // ^ parameter - // ^ type + // <- label + // ^^^^^^^^^^^ parameter + // ^ punctuation.delimiter + // ^^^^^^ type.builtin // ^ punctuation.delimiter ) { replace(in: "A,B,C", each: ",", with: " ") - // <- function + // <- function.call // ^ punctuation.bracket - // ^ symbol - // ^ symbol - // ^ string + // ^^ label + // ^ punctuation.delimiter + // ^^^^^^^ string // ^ punctuation.delimiter - // ^ symbol - // ^ symbol - // ^ string + // ^^^^ label + // ^ punctuation.delimiter + // ^^^ string // ^ punctuation.delimiter - // ^ symbol - // ^ symbol - // ^ string + // ^^^^ label + // ^ punctuation.delimiter + // ^^^ string // ^ punctuation.bracket } // <- punctuation.bracket pub external fn random_float() -> Float = "rand" "uniform" // <- type.qualifier -// ^ type.qualifier -// ^ keyword.function -// ^ function +// ^^^^^^^^ type.qualifier +// ^^ keyword.function +// ^^^^^^^^^^^^ function // ^ punctuation.bracket // ^ punctuation.bracket -// ^ operator -// ^ type +// ^^ punctuation.delimiter +// ^^^^^ type.builtin // ^ operator -// ^ namespace -// ^ function +// ^^^^^^ namespace +// ^^^^^^^^^ function pub external fn inspect(a) -> a = "Elixir.IO" "inspect" // <- type.qualifier -// ^ type.qualifier -// ^ keyword.function -// ^ function +// ^^^^^^^^ type.qualifier +// ^^ keyword.function +// ^^^^^^^ function // ^ punctuation.bracket // ^ type // ^ punctuation.bracket -// ^ operator +// ^^ punctuation.delimiter // ^ type // ^ operator -// ^ namespace -// ^ function +// ^^^^^^^^^^^ namespace +// ^^^^^^^^^ function diff --git a/tests/query/highlights/gleam/import.gleam b/tests/query/highlights/gleam/import.gleam index 28356ca8c..c48b38199 100644 --- a/tests/query/highlights/gleam/import.gleam +++ b/tests/query/highlights/gleam/import.gleam @@ -1,7 +1,7 @@ import gleam/io // <- include // ^ namespace -// ^ namespace +// ^ operator // ^ namespace import cat as kitten @@ -13,10 +13,10 @@ import cat as kitten import animal/cat.{Cat, stroke} // <- include // ^ namespace -// ^ namespace +// ^ operator // ^ punctuation.delimiter // ^ punctuation.bracket -// ^ type +// ^^^ type // ^ punctuation.delimiter -// ^ function +// ^^^^^^ function // ^ punctuation.bracket diff --git a/tests/query/highlights/gleam/pipe.gleam b/tests/query/highlights/gleam/pipe.gleam index 33f27312b..d0341217b 100644 --- a/tests/query/highlights/gleam/pipe.gleam +++ b/tests/query/highlights/gleam/pipe.gleam @@ -3,7 +3,7 @@ pub fn run() { // <- number |> add(_, 2) // <- operator - // ^ function + // ^^^ function.call // ^ punctuation.bracket // ^ comment // ^ punctuation.delimiter @@ -11,7 +11,7 @@ pub fn run() { // ^ punctuation.bracket |> add(3) // <- operator - // ^ function + // ^^^ function.call // ^ punctuation.bracket // ^ number // ^ punctuation.bracket diff --git a/tests/query/highlights/gleam/try.gleam b/tests/query/highlights/gleam/try.gleam index 136d44eb4..22c72c39e 100644 --- a/tests/query/highlights/gleam/try.gleam +++ b/tests/query/highlights/gleam/try.gleam @@ -1,9 +1,9 @@ pub fn main() { try x = Ok(1) - // <- keyword + // <- exception // ^ variable // ^ operator - // ^ type + // ^^ constant.builtin // ^ punctuation.bracket // ^ number // ^ punctuation.bracket diff --git a/tests/query/highlights/gleam/type.gleam b/tests/query/highlights/gleam/type.gleam index d25efde34..b44aceadc 100644 --- a/tests/query/highlights/gleam/type.gleam +++ b/tests/query/highlights/gleam/type.gleam @@ -1,18 +1,18 @@ pub type Cat { // <- type.qualifier -// ^ keyword.function -// ^ type +// ^^^^ keyword +// ^^^ type // ^ punctuation.bracket Cat(name: String, cuteness: Int) - // <- type + // <- constructor // ^ punctuation.bracket - // ^ property - // ^ property - // ^ type + // ^^^^ property + // ^ punctuation.delimiter + // ^^^^^^ type.builtin // ^ punctuation.delimiter - // ^ property - // ^ property - // ^ type + // ^^^^^^^^ property + // ^ punctuation.delimiter + // ^^^ type.builtin // ^ punctuation.bracket } @@ -20,64 +20,65 @@ fn cats() { Cat(name: "Nubi", cuteness: 2001) // <- type // ^ punctuation.bracket - // ^ property - // ^ property - // ^ string + // ^^^^ property + // ^ punctuation.delimiter + // ^^^^^^ string // ^ punctuation.delimiter - // ^ property - // ^ property - // ^ number + // ^^^^^^^^ property + // ^ punctuation.delimiter + // ^^^^ number + // ^ punctuation.bracket Cat("Ginny", 1950) - // <- type + // <- constructor // ^ punctuation.bracket - // ^ string + // ^^^^^^^ string // ^ punctuation.delimiter - // ^ number + // ^^^^ number // ^ punctuation.bracket } type Box(inner_type) { -// <- keyword.function -// ^ type +// <- keyword +// ^^^ type // ^ punctuation.bracket -// ^ parameter +// ^^^^^^^^^^ type // ^ punctuation.bracket // ^ punctuation.bracket Box(inner: inner_type) - // <- type + // <- constructor // ^ punctuation.bracket - // ^ property - // ^ property - // ^ type + // ^^^^^ property + // ^ punctuation.delimiter + // ^^^^^^^^^^ type // ^ punctuation.bracket } pub opaque type Counter { // <- type.qualifier -// ^ type.qualifier -// ^ keyword.function -// ^ type +// ^^^^^^ type.qualifier +// ^^^^ keyword +// ^^^^^^^ type // ^ punctuation.bracket Counter(value: Int) } pub fn have_birthday(person) { Person(..person, age: person.age + 1, is_happy: True) - // <- type + // <- constructor // ^ punctuation.bracket - // ^ operator - // ^ variable + // ^^ operator + // ^^^^^^ variable // ^ punctuation.delimiter - // ^ property - // ^ property - // ^ variable + // ^^^ property + // ^ punctuation.delimiter + // ^^^^^^ variable // ^ punctuation.delimiter - // ^ property + // ^^^ property // ^ operator // ^ number // ^ punctuation.delimiter - // ^ property - // ^ property - // ^ boolean + // ^^^^^^^^ property + // ^ punctuation.delimiter + // ^^^^ boolean // ^ punctuation.bracket } |
