Add object-oriented keywords high-lighting
This commit is contained in:
parent
60804f0ff0
commit
555e10c736
2 changed files with 29 additions and 0 deletions
|
|
@ -42,6 +42,11 @@
|
||||||
"var"
|
"var"
|
||||||
"while"
|
"while"
|
||||||
|
|
||||||
|
"class"
|
||||||
|
"extends"
|
||||||
|
"method"
|
||||||
|
"new"
|
||||||
|
|
||||||
"_cast"
|
"_cast"
|
||||||
"_chunks"
|
"_chunks"
|
||||||
"_exp"
|
"_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…
Add table
Add a link
Reference in a new issue