Add 'Object' built-in type
This commit is contained in:
parent
425890a6fc
commit
9c51cbc93f
|
@ -5,7 +5,7 @@
|
||||||
(#is-not? local))
|
(#is-not? local))
|
||||||
|
|
||||||
((type_identifier) @type.builtin
|
((type_identifier) @type.builtin
|
||||||
(#match? @type.builtin "^(int|string)$")
|
(#match? @type.builtin "^(int|string|Object)$")
|
||||||
(#is-not? local))
|
(#is-not? local))
|
||||||
; }}}
|
; }}}
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,17 @@ let
|
||||||
|
|
||||||
var c : int := "This is an \"int\""
|
var c : int := "This is an \"int\""
|
||||||
/* ^ type.builtin (not sure why it isn't 'type')*/
|
/* ^ type.builtin (not sure why it isn't 'type')*/
|
||||||
|
|
||||||
|
var d : Object := nil
|
||||||
|
/* ^ type.builtin */
|
||||||
|
|
||||||
|
type Object = int
|
||||||
in
|
in
|
||||||
let
|
let
|
||||||
var c : int := "This is an int"
|
var c : int := "This is an int"
|
||||||
/* ^ type.builtin (not sure why it isn't 'type')*/
|
/* ^ type.builtin (not sure why it isn't 'type')*/
|
||||||
|
var d : Object := "This is an object"
|
||||||
|
/* ^ type.builtin (not sure why it isn't 'type')*/
|
||||||
in
|
in
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ let
|
||||||
class A extends Object {}
|
class A extends Object {}
|
||||||
/* <- keyword */
|
/* <- keyword */
|
||||||
/* ^ keyword */
|
/* ^ keyword */
|
||||||
/* ^ type */
|
/* ^ type.builtin */
|
||||||
|
|
||||||
type B = class extends A {
|
type B = class extends A {
|
||||||
/* ^ keyword */
|
/* ^ keyword */
|
||||||
|
|
Loading…
Reference in a new issue