mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 20:30:05 -04:00
test(tiger): import upstream tests
This commit is contained in:
parent
ef385991b6
commit
6e3f888dc7
16 changed files with 454 additions and 0 deletions
43
tests/query/highlights/tiger/built-ins.tig
Normal file
43
tests/query/highlights/tiger/built-ins.tig
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
let
|
||||
var a := exit(0)
|
||||
/* ^ function.builtin */
|
||||
|
||||
primitive exit(ret: int) /* Shadowing the prelude-included built-in */
|
||||
/* ^ type.builtin */
|
||||
|
||||
var b := exit(0)
|
||||
/* ^ function */
|
||||
|
||||
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);
|
||||
/* <- function */
|
||||
|
||||
print("shadowing is fun");
|
||||
/* <- function.builtin */
|
||||
|
||||
self;
|
||||
/* <- variable */
|
||||
|
||||
b := print
|
||||
/* ^ variable */
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue