Add object-oriented keywords high-lighting

This commit is contained in:
Bruno BELANYI 2022-06-04 21:27:09 +02:00
parent 60804f0ff0
commit 555e10c736
2 changed files with 29 additions and 0 deletions

View File

@ -42,6 +42,11 @@
"var"
"while"
"class"
"extends"
"method"
"new"
"_cast"
"_chunks"
"_exp"

View 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