diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-12-24 12:52:21 +0100 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-01-19 16:58:37 +0100 |
| commit | 10dd49958c96f86c8247c715bd20a6681afc1d8b (patch) | |
| tree | 511849caff160e818f4dd08a6106137dcadb620d /tests/query/highlights/tiger | |
| parent | feat(injections): add printf format strings (diff) | |
| download | nvim-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/tiger')
| -rw-r--r-- | tests/query/highlights/tiger/built-ins.tig | 24 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/comment.tig | 6 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/functions.tig | 10 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/identifiers.tig | 36 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/imports.tig | 4 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/keywords.tig | 38 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/literals.tig | 8 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/meta-variables.tig | 10 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/object-oriented.tig | 24 | ||||
| -rw-r--r-- | tests/query/highlights/tiger/operators.tig | 48 |
10 files changed, 104 insertions, 104 deletions
diff --git a/tests/query/highlights/tiger/built-ins.tig b/tests/query/highlights/tiger/built-ins.tig index 7cc1ca501..9aa649421 100644 --- a/tests/query/highlights/tiger/built-ins.tig +++ b/tests/query/highlights/tiger/built-ins.tig @@ -1,21 +1,21 @@ let var a := exit(0) - /* ^ function.builtin */ + /* ^ @function.builtin */ primitive exit(ret: int) /* Shadowing the prelude-included built-in */ - /* ^ type.builtin */ + /* ^ @type.builtin */ var b := exit(0) - /* ^ function.builtin */ + /* ^ @function.builtin */ type int = string /* Shadowing the built-in type */ - /* ^ type.builtin */ + /* ^ @type.builtin */ var c : int := "This is an \"int\"" - /* ^ type.builtin (not sure why it isn't 'type')*/ + /* ^ @type.builtin (not sure why it isn't 'type')*/ var d : Object := nil - /* ^ type.builtin */ + /* ^ @type.builtin */ type Object = int @@ -23,22 +23,22 @@ let in let var c : int := "This is an int" - /* ^ type.builtin (not sure why it isn't 'type')*/ + /* ^ @type.builtin (not sure why it isn't 'type')*/ var d : Object := "This is an object" - /* ^ type.builtin (not sure why it isn't 'type')*/ + /* ^ @type.builtin (not sure why it isn't 'type')*/ in end; exit(1); - /* <- function.builtin */ + /* <- @function.builtin */ print("shadowing is fun"); - /* <- function.builtin */ + /* <- @function.builtin */ self; - /* <- variable.builtin */ + /* <- @variable.builtin */ b := print - /* ^ variable */ + /* ^ @variable */ end /* vim: set ft=tiger: */ diff --git a/tests/query/highlights/tiger/comment.tig b/tests/query/highlights/tiger/comment.tig index a9c91535f..9323dba05 100644 --- a/tests/query/highlights/tiger/comment.tig +++ b/tests/query/highlights/tiger/comment.tig @@ -1,6 +1,6 @@ /* This is /* a nested */ comment */ -/* <- comment - ^ comment - ^ comment +/* <- @comment + ^ @comment + ^ @comment */ /* vim: set ft=tiger: */ diff --git a/tests/query/highlights/tiger/functions.tig b/tests/query/highlights/tiger/functions.tig index 219c05916..6505d20fe 100644 --- a/tests/query/highlights/tiger/functions.tig +++ b/tests/query/highlights/tiger/functions.tig @@ -1,9 +1,9 @@ primitive print(s: string) -/* ^ function */ -/* ^ parameter */ +/* ^ @function */ +/* ^ @parameter */ function func(a: int) : int = (print("Hello World!"); a) -/* ^ function */ -/* ^ parameter */ -/* ^ function.builtin */ +/* ^ @function */ +/* ^ @parameter */ +/* ^ @function.builtin */ /* vim: set ft=tiger: */ diff --git a/tests/query/highlights/tiger/identifiers.tig b/tests/query/highlights/tiger/identifiers.tig index 4216c930d..e712e57de 100644 --- a/tests/query/highlights/tiger/identifiers.tig +++ b/tests/query/highlights/tiger/identifiers.tig @@ -1,30 +1,30 @@ type int = int -/* ^ variable */ -/* ^ type.builtin */ +/* ^ @variable */ +/* ^ @type.builtin */ type int_array = array of int -/* ^ type.builtin */ +/* ^ @type.builtin */ type record = {a: int, b: string} -/* ^ property */ -/* ^ type.builtin */ -/* ^ property */ -/* ^ type.builtin */ +/* ^ @property */ +/* ^ @type.builtin */ +/* ^ @property */ +/* ^ @type.builtin */ var record := record {a = 12, b = "27"} -/* ^ variable */ -/* ^ type */ -/* ^ property */ -/* ^ property */ +/* ^ @variable */ +/* ^ @type */ +/* ^ @property */ +/* ^ @property */ var array := int_array[12] of 27; -/* ^ variable */ -/* ^ type */ +/* ^ @variable */ +/* ^ @type */ primitive func(a: int, b: string) : array -/* ^ parameter */ -/* ^ type.builtin */ -/* ^ parameter */ -/* ^ type.builtin */ -/* ^ type */ +/* ^ @parameter */ +/* ^ @type.builtin */ +/* ^ @parameter */ +/* ^ @type.builtin */ +/* ^ @type */ /* vim: set ft=tiger: */ diff --git a/tests/query/highlights/tiger/imports.tig b/tests/query/highlights/tiger/imports.tig index 068dc4810..f20a0bc1a 100644 --- a/tests/query/highlights/tiger/imports.tig +++ b/tests/query/highlights/tiger/imports.tig @@ -1,4 +1,4 @@ import "lib.tih" -/* <- include */ -/* ^ string.special */ +/* <- @include */ +/* ^ @string.special */ /* vim: set ft=tiger: */ diff --git a/tests/query/highlights/tiger/keywords.tig b/tests/query/highlights/tiger/keywords.tig index 862a531cd..7deb0288d 100644 --- a/tests/query/highlights/tiger/keywords.tig +++ b/tests/query/highlights/tiger/keywords.tig @@ -1,42 +1,42 @@ let -/* <- keyword */ +/* <- @keyword */ var a := 12 - /* <- keyword */ + /* <- @keyword */ function f() : int = a - /* <- keyword.function */ + /* <- @keyword.function */ primitive g() - /* <- keyword.function */ + /* <- @keyword.function */ import "lib.tih" - /* <- include */ + /* <- @include */ type array_of_int = array of int - /* <- keyword */ - /* ^ keyword */ - /* ^ keyword */ + /* <- @keyword */ + /* ^ @keyword */ + /* ^ @keyword */ in -/* <- keyword */ +/* <- @keyword */ 12; if 12 then 27 else 42; - /* <- keyword */ - /* ^ keyword */ - /* ^ keyword */ + /* <- @keyword */ + /* ^ @keyword */ + /* ^ @keyword */ for i := 12 to 27 do 42; - /* <- repeat */ - /* ^ repeat */ - /* ^ repeat */ + /* <- @repeat */ + /* ^ @repeat */ + /* ^ @repeat */ while 12 do break - /* <- repeat */ - /* ^ repeat */ - /* ^ keyword */ + /* <- @repeat */ + /* ^ @repeat */ + /* ^ @keyword */ end -/* <- keyword */ +/* <- @keyword */ /* vim: set ft=tiger: */ diff --git a/tests/query/highlights/tiger/literals.tig b/tests/query/highlights/tiger/literals.tig index c7d7b5d8e..46f3c8616 100644 --- a/tests/query/highlights/tiger/literals.tig +++ b/tests/query/highlights/tiger/literals.tig @@ -1,9 +1,9 @@ nil -/* <- constant.builtin */ +/* <- @constant.builtin */ 42 -/* <- number */ +/* <- @number */ "Hello World!\n" -/* <- string - ^ string.escape +/* <- @string + ^ @string.escape */ /* vim: set ft=tiger: */ diff --git a/tests/query/highlights/tiger/meta-variables.tig b/tests/query/highlights/tiger/meta-variables.tig index 24c01ac69..1b2c6c976 100644 --- a/tests/query/highlights/tiger/meta-variables.tig +++ b/tests/query/highlights/tiger/meta-variables.tig @@ -1,14 +1,14 @@ let _chunks(42) - /* <- keyword */ + /* <- @keyword */ in _lvalue(12) : _namety(42) := _cast("I'm So Meta Even This Acronym", string); - /* <- keyword */ - /* ^ keyword */ - /* ^ keyword */ + /* <- @keyword */ + /* ^ @keyword */ + /* ^ @keyword */ _exp(42) - /* <- keyword */ + /* <- @keyword */ end /* vim: set ft=tiger: */ diff --git a/tests/query/highlights/tiger/object-oriented.tig b/tests/query/highlights/tiger/object-oriented.tig index b09b82b19..607efec8c 100644 --- a/tests/query/highlights/tiger/object-oriented.tig +++ b/tests/query/highlights/tiger/object-oriented.tig @@ -1,29 +1,29 @@ let class A extends Object {} - /* <- keyword */ - /* ^ keyword */ - /* ^ type.builtin */ + /* <- @keyword */ + /* ^ @keyword */ + /* ^ @type.builtin */ type B = class extends A { - /* ^ keyword */ - /* ^ keyword */ - /* ^ type */ + /* ^ @keyword */ + /* ^ @keyword */ + /* ^ @type */ var a := 12 method meth() : int = self.a - /* <- keyword.function */ - /* ^ method */ - /* ^ variable.builtin */ + /* <- @keyword.function */ + /* ^ @method */ + /* ^ @variable.builtin */ } var object := new B - /* ^ keyword.operator */ + /* ^ @keyword.operator */ in object.a := 27; - /* ^ property */ + /* ^ @property */ object.meth() - /* ^ method */ + /* ^ @method */ end /* vim: set ft=tiger: */ diff --git a/tests/query/highlights/tiger/operators.tig b/tests/query/highlights/tiger/operators.tig index 569b8a8bc..d803af75b 100644 --- a/tests/query/highlights/tiger/operators.tig +++ b/tests/query/highlights/tiger/operators.tig @@ -1,49 +1,49 @@ let var a : int := 42 - /* ^ punctuation.delimiter */ - /* ^ operator */ + /* ^ @punctuation.delimiter */ + /* ^ @operator */ in ( - /* <- punctuation.bracket */ + /* <- @punctuation.bracket */ -1 | 2 & 3 + 4 * 5; - /* <- operator */ - /* ^ operator */ - /* ^ operator */ - /* ^ operator */ - /* ^ operator */ - /* ^ punctuation.delimiter */ + /* <- @operator */ + /* ^ @operator */ + /* ^ @operator */ + /* ^ @operator */ + /* ^ @operator */ + /* ^ @punctuation.delimiter */ 12 >= 27; - /* ^ operator */ + /* ^ @operator */ 12 <= 27; - /* ^ operator */ + /* ^ @operator */ 12 = 27; - /* ^ operator */ + /* ^ @operator */ 12 <> 27; - /* ^ operator */ + /* ^ @operator */ 12 < 27; - /* ^ operator */ + /* ^ @operator */ 12 > 27; - /* ^ operator */ + /* ^ @operator */ record.field; - /* ^ punctuation.delimiter */ + /* ^ @punctuation.delimiter */ func(a, b); - /* ^ punctuation.bracket */ - /* ^ punctuation.bracket */ - /* ^ punctuation.delimiter */ + /* ^ @punctuation.bracket */ + /* ^ @punctuation.bracket */ + /* ^ @punctuation.delimiter */ record_type { }; - /* ^ punctuation.bracket */ - /* ^ punctuation.bracket */ + /* ^ @punctuation.bracket */ + /* ^ @punctuation.bracket */ array[42] - /* ^ punctuation.bracket */ - /* ^ punctuation.bracket */ + /* ^ @punctuation.bracket */ + /* ^ @punctuation.bracket */ ) - /* <- punctuation.bracket */ + /* <- @punctuation.bracket */ end /* vim: set ft=tiger: */ |
