Add identifiers high-lighting
We now make use of the more specific '_type_identifier' and '_field_identifier' rules!
This commit is contained in:
parent
da494122ea
commit
0b549493a2
|
@ -1,5 +1,9 @@
|
|||
; Misc {{{
|
||||
(comment) @comment
|
||||
|
||||
(type_identifier) @type
|
||||
(field_identifier) @property
|
||||
(identifier) @variable
|
||||
; }}}
|
||||
|
||||
; Keywords {{{
|
||||
|
|
29
test/highlight/identifiers.tig
Normal file
29
test/highlight/identifiers.tig
Normal file
|
@ -0,0 +1,29 @@
|
|||
type int = int
|
||||
/* ^ variable */
|
||||
/* ^ type */
|
||||
|
||||
type int_array = array of int
|
||||
/* ^ type */
|
||||
|
||||
type record = {a: int, b: string}
|
||||
/* ^ property */
|
||||
/* ^ type */
|
||||
/* ^ property */
|
||||
/* ^ type */
|
||||
|
||||
var record := record {a = 12, b = "27"}
|
||||
/* ^ variable */
|
||||
/* ^ type */
|
||||
/* ^ property */
|
||||
/* ^ property */
|
||||
|
||||
var array := int_array[12] of 27;
|
||||
/* ^ variable */
|
||||
/* ^ type */
|
||||
|
||||
primitive func(a: int, b: string) : array
|
||||
/* ^ variable */
|
||||
/* ^ type */
|
||||
/* ^ variable */
|
||||
/* ^ type */
|
||||
/* ^ type */
|
Loading…
Reference in a new issue