diff options
| author | ObserverOfTime <chronobserver@disroot.org> | 2024-01-10 18:05:37 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-01-19 16:58:37 +0100 |
| commit | fa38f4e6f94b4e67fb80af21178dba3b422efb12 (patch) | |
| tree | f28ad35e6a65f177f33c10091175fb75549f2d8c /tests | |
| parent | fix(highlights): improve consistency (diff) | |
| download | nvim-treesitter-fa38f4e6f94b4e67fb80af21178dba3b422efb12.tar nvim-treesitter-fa38f4e6f94b4e67fb80af21178dba3b422efb12.tar.gz nvim-treesitter-fa38f4e6f94b4e67fb80af21178dba3b422efb12.tar.bz2 nvim-treesitter-fa38f4e6f94b4e67fb80af21178dba3b422efb12.tar.lz nvim-treesitter-fa38f4e6f94b4e67fb80af21178dba3b422efb12.tar.xz nvim-treesitter-fa38f4e6f94b4e67fb80af21178dba3b422efb12.tar.zst nvim-treesitter-fa38f4e6f94b4e67fb80af21178dba3b422efb12.zip | |
fix(highlights): improve member/property distinction
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/query/highlights/ecma/test.ts | 8 | ||||
| -rw-r--r-- | tests/query/highlights/gleam/type.gleam | 16 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/identifiers.tig | 8 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/object-oriented.tig | 2 | ||||
| -rw-r--r-- | tests/query/highlights/wing/nested_method.w | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/tests/query/highlights/ecma/test.ts b/tests/query/highlights/ecma/test.ts index ecdfa8929..fa926f930 100644 --- a/tests/query/highlights/ecma/test.ts +++ b/tests/query/highlights/ecma/test.ts @@ -1,15 +1,15 @@ class H { pub_field = "Hello"; - // ^ @property + // ^ @variable.member #priv_field = "World!"; - // ^ @property + // ^ @variable.member #private_method() { // ^ @function.method return `${this.pub_field} -- ${this.#priv_field}`; - // ^ @property - // ^ @property + // ^ @variable.member + // ^ @variable.member } public_method() { diff --git a/tests/query/highlights/gleam/type.gleam b/tests/query/highlights/gleam/type.gleam index 0905e1ea4..da840c194 100644 --- a/tests/query/highlights/gleam/type.gleam +++ b/tests/query/highlights/gleam/type.gleam @@ -6,11 +6,11 @@ pub type Cat { Cat(name: String, cuteness: Int) // <- @constructor // ^ @punctuation.bracket - // ^^^^ @property + // ^^^^ @variable.member // ^ @punctuation.delimiter // ^^^^^^ @type.builtin // ^ @punctuation.delimiter - // ^^^^^^^^ @property + // ^^^^^^^^ @variable.member // ^ @punctuation.delimiter // ^^^ @type.builtin // ^ @punctuation.bracket @@ -20,11 +20,11 @@ fn cats() { Cat(name: "Nubi", cuteness: 2001) // <- @type // ^ @punctuation.bracket - // ^^^^ @property + // ^^^^ @variable.member // ^ @punctuation.delimiter // ^^^^^^ @string // ^ @punctuation.delimiter - // ^^^^^^^^ @property + // ^^^^^^^^ @variable.member // ^ @punctuation.delimiter // ^^^^ @number // ^ @punctuation.bracket @@ -47,7 +47,7 @@ type Box(inner_type) { Box(inner: inner_type) // <- @constructor // ^ @punctuation.bracket - // ^^^^^ @property + // ^^^^^ @variable.member // ^ @punctuation.delimiter // ^^^^^^^^^^ @type // ^ @punctuation.bracket @@ -69,15 +69,15 @@ pub fn have_birthday(person) { // ^^ @operator // ^^^^^^ @variable // ^ @punctuation.delimiter - // ^^^ @property + // ^^^ @variable.member // ^ @punctuation.delimiter // ^^^^^^ @variable // ^ @punctuation.delimiter - // ^^^ @property + // ^^^ @variable.member // ^ @operator // ^ @number // ^ @punctuation.delimiter - // ^^^^^^^^ @property + // ^^^^^^^^ @variable.member // ^ @punctuation.delimiter // ^^^^ @boolean // ^ @punctuation.bracket diff --git a/tests/query/highlights/tiger/identifiers.tig b/tests/query/highlights/tiger/identifiers.tig index e38749071..8d2207dd6 100644 --- a/tests/query/highlights/tiger/identifiers.tig +++ b/tests/query/highlights/tiger/identifiers.tig @@ -6,16 +6,16 @@ type int_array = array of int /* ^ @type.builtin */ type record = {a: int, b: string} -/* ^ @property */ +/* ^ @variable.member */ /* ^ @type.builtin */ -/* ^ @property */ +/* ^ @variable.member */ /* ^ @type.builtin */ var record := record {a = 12, b = "27"} /* ^ @variable */ /* ^ @type */ -/* ^ @property */ -/* ^ @property */ +/* ^ @variable.member */ +/* ^ @variable.member */ var array := int_array[12] of 27; /* ^ @variable */ diff --git a/tests/query/highlights/tiger/object-oriented.tig b/tests/query/highlights/tiger/object-oriented.tig index bf1632485..e67029c42 100644 --- a/tests/query/highlights/tiger/object-oriented.tig +++ b/tests/query/highlights/tiger/object-oriented.tig @@ -21,7 +21,7 @@ let /* ^ @keyword.operator */ in object.a := 27; - /* ^ @property */ + /* ^ @variable.member */ object.meth() /* ^ @function.method */ diff --git a/tests/query/highlights/wing/nested_method.w b/tests/query/highlights/wing/nested_method.w index 4fe5ceb6a..080d29793 100644 --- a/tests/query/highlights/wing/nested_method.w +++ b/tests/query/highlights/wing/nested_method.w @@ -1,4 +1,4 @@ test1.test2.test3(); // <- @variable -// ^ @property +// ^ @variable.member // ^ @function.method.call |
