aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/tiger/object-oriented.tig
blob: 5c48c543e2356387881b6f402a9caa11146db02c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
let
  class A extends Object {}
  /* <- @keyword.type */
  /*      ^ @keyword */
  /*              ^ @type.builtin */

  type B = class extends A {
  /*       ^ @keyword.type */
  /*             ^ @keyword */
  /*                     ^ @type */

    var a := 12

    method meth() : int = self.a
    /* <- @keyword.function */
    /*     ^ @function.method */
    /*                    ^ @variable.builtin */
  }

  var object := new B
  /*            ^ @keyword.operator */
in
  object.a := 27;
  /*     ^ @variable.member */

  object.meth()
  /*     ^ @function.method */
end
/* vim: set ft=tiger: */