nvim-treesitter/tests/query/highlights/tiger/built-ins.tig

45 lines
920 B
Text
Raw Normal View History

2022-06-14 17:30:49 +02:00
let
var a := exit(0)
/* ^ function.builtin */
primitive exit(ret: int) /* Shadowing the prelude-included built-in */
/* ^ type.builtin */
var b := exit(0)
2022-06-14 20:01:12 +02:00
/* ^ function.builtin */
2022-06-14 17:30:49 +02:00
type int = string /* Shadowing the built-in type */
/* ^ type.builtin */
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
var self := "self"
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;
exit(1);
2022-06-14 20:01:12 +02:00
/* <- function.builtin */
2022-06-14 17:30:49 +02:00
print("shadowing is fun");
/* <- function.builtin */
self;
2022-06-14 20:01:12 +02:00
/* <- variable.builtin */
2022-06-14 17:30:49 +02:00
b := print
/* ^ variable */
end
/* vim: set ft=tiger: */