Add 'Object' built-in type

This commit is contained in:
Bruno BELANYI 2022-06-04 21:31:43 +02:00
parent 425890a6fc
commit 9c51cbc93f
3 changed files with 9 additions and 2 deletions

View file

@ -5,7 +5,7 @@
(#is-not? local))
((type_identifier) @type.builtin
(#match? @type.builtin "^(int|string)$")
(#match? @type.builtin "^(int|string|Object)$")
(#is-not? local))
; }}}

View file

@ -13,10 +13,17 @@ let
var c : int := "This is an \"int\""
/* ^ type.builtin (not sure why it isn't 'type')*/
var d : Object := nil
/* ^ type.builtin */
type Object = int
in
let
var c : int := "This is an int"
/* ^ 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
end;

View file

@ -2,7 +2,7 @@ let
class A extends Object {}
/* <- keyword */
/* ^ keyword */
/* ^ type */
/* ^ type.builtin */
type B = class extends A {
/* ^ keyword */