Add object-oriented keywords high-lighting
This commit is contained in:
parent
60804f0ff0
commit
555e10c736
|
@ -42,6 +42,11 @@
|
|||
"var"
|
||||
"while"
|
||||
|
||||
"class"
|
||||
"extends"
|
||||
"method"
|
||||
"new"
|
||||
|
||||
"_cast"
|
||||
"_chunks"
|
||||
"_exp"
|
||||
|
|
24
test/highlight/object-oriented.tig
Normal file
24
test/highlight/object-oriented.tig
Normal file
|
@ -0,0 +1,24 @@
|
|||
let
|
||||
class A extends Object {}
|
||||
/* <- keyword */
|
||||
/* ^ keyword */
|
||||
/* ^ type */
|
||||
|
||||
type B = class extends A {
|
||||
/* ^ keyword */
|
||||
/* ^ keyword */
|
||||
/* ^ type */
|
||||
|
||||
var a := 12
|
||||
|
||||
method meth() : int = self.a
|
||||
/* <- keyword */
|
||||
/* ^ variable */
|
||||
}
|
||||
|
||||
var object := new B
|
||||
/* ^ keyword */
|
||||
in
|
||||
object.a := 27;
|
||||
/* ^ property */
|
||||
end
|
Loading…
Reference in a new issue