diff --git a/queries/highlights.scm b/queries/highlights.scm index 415dac3..5d74f80 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -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)) ; }}} diff --git a/test/highlight/built-ins.tig b/test/highlight/built-ins.tig index dd23b30..9fe0487 100644 --- a/test/highlight/built-ins.tig +++ b/test/highlight/built-ins.tig @@ -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; diff --git a/test/highlight/object-oriented.tig b/test/highlight/object-oriented.tig index bcacffa..4962af5 100644 --- a/test/highlight/object-oriented.tig +++ b/test/highlight/object-oriented.tig @@ -2,7 +2,7 @@ let class A extends Object {} /* <- keyword */ /* ^ keyword */ - /* ^ type */ + /* ^ type.builtin */ type B = class extends A { /* ^ keyword */