Some checks failed
ci/woodpecker/push/check Pipeline failed
I fear the upstream queries may be broken, somehow, as they don't work with `--apply-all-captures` which should match the "last query wins" matching behaviour of `nvim-treesitter`. I also removed `locals.scm`, as `tree-sitter` and `nvim-treesitter` don't agree on how to write it, and I don't really care about it. It does mean that the highlights can't tell the difference between `int` the built-in and `int` the type alias anymore, but that's a small edge-case (and `nvim-treesitter` didn't support it anyway).
43 lines
895 B
Text
43 lines
895 B
Text
let
|
|
var a := exit(0)
|
|
/* ^ function.builtin */
|
|
|
|
primitive exit(ret: int) /* Shadowing the prelude-included built-in */
|
|
/* ^ type.builtin */
|
|
|
|
var b := exit(0)
|
|
/* ^ function.builtin */
|
|
|
|
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.builtin */
|
|
|
|
print("shadowing is fun");
|
|
/* <- function.builtin */
|
|
|
|
self;
|
|
/* <- variable.builtin */
|
|
|
|
b := print
|
|
/* ^ variable */
|
|
end
|