mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 18:30:06 -04:00
test(tiger): import upstream tests
This commit is contained in:
parent
ef385991b6
commit
6e3f888dc7
16 changed files with 454 additions and 0 deletions
28
tests/query/highlights/tiger/object-oriented.tig
Normal file
28
tests/query/highlights/tiger/object-oriented.tig
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
let
|
||||
class A extends Object {}
|
||||
/* <- keyword */
|
||||
/* ^ keyword */
|
||||
/* ^ type.builtin */
|
||||
|
||||
type B = class extends A {
|
||||
/* ^ keyword */
|
||||
/* ^ keyword */
|
||||
/* ^ type */
|
||||
|
||||
var a := 12
|
||||
|
||||
method meth() : int = self.a
|
||||
/* <- keyword.method */
|
||||
/* ^ method */
|
||||
/* ^ variable.builtin */
|
||||
}
|
||||
|
||||
var object := new B
|
||||
/* ^ keyword.constructor */
|
||||
in
|
||||
object.a := 27;
|
||||
/* ^ property */
|
||||
|
||||
object.meth()
|
||||
/* ^ method */
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue