highlights(tiger): fix captures

This commit is contained in:
ObserverOfTime 2022-10-22 18:19:44 +03:00
parent 04e560490d
commit 353538d570
4 changed files with 7 additions and 11 deletions

View file

@ -23,6 +23,7 @@
[ [
"function" "function"
"primitive" "primitive"
"method"
] @keyword.function ] @keyword.function
[ [
@ -32,13 +33,9 @@
"while" "while"
] @repeat ] @repeat
[ "new" @keyword.operator
"new"
] @constructor
[ "import" @include
"method"
] @method
[ [
"array" "array"
@ -46,7 +43,6 @@
"else" "else"
"end" "end"
"if" "if"
"import"
"in" "in"
"let" "let"
"of" "of"

View file

@ -1,4 +1,4 @@
import "lib.tih" import "lib.tih"
/* <- keyword */ /* <- include */
/* ^ string.special */ /* ^ string.special */
/* vim: set ft=tiger: */ /* vim: set ft=tiger: */

View file

@ -10,7 +10,7 @@ let
/* <- keyword.function */ /* <- keyword.function */
import "lib.tih" import "lib.tih"
/* <- keyword */ /* <- include */
type array_of_int = array of int type array_of_int = array of int
/* <- keyword */ /* <- keyword */

View file

@ -12,13 +12,13 @@ let
var a := 12 var a := 12
method meth() : int = self.a method meth() : int = self.a
/* <- method */ /* <- keyword.function */
/* ^ method */ /* ^ method */
/* ^ variable.builtin */ /* ^ variable.builtin */
} }
var object := new B var object := new B
/* ^ constructor */ /* ^ keyword.operator */
in in
object.a := 27; object.a := 27;
/* ^ property */ /* ^ property */