tree-sitter-tiger/test/highlight/object-oriented.tig

29 lines
533 B
Plaintext
Raw Normal View History

let
class A extends Object {}
/* <- keyword */
/* ^ keyword */
2022-06-04 21:31:43 +02:00
/* ^ type.builtin */
type B = class extends A {
/* ^ keyword */
/* ^ keyword */
/* ^ type */
var a := 12
method meth() : int = self.a
2022-06-04 21:35:31 +02:00
/* <- keyword.method */
2022-06-04 21:29:27 +02:00
/* ^ method */
/* ^ variable.builtin */
}
var object := new B
2022-06-04 21:35:14 +02:00
/* ^ keyword.constructor */
in
object.a := 27;
/* ^ property */
2022-06-04 21:29:27 +02:00
object.meth()
/* ^ method */
end