Add functions high-lighting
This commit is contained in:
parent
67b555c381
commit
62a601469e
|
@ -48,6 +48,18 @@
|
|||
] @punctuation.bracket
|
||||
; }}}
|
||||
|
||||
; Functions {{{
|
||||
(function_call
|
||||
function: (identifier) @function)
|
||||
(function_declaration
|
||||
name: (identifier) @function)
|
||||
(primitive_declaration
|
||||
name: (identifier) @function)
|
||||
|
||||
(parameters
|
||||
name: (identifier) @variable.parameter)
|
||||
; }}}
|
||||
|
||||
; Misc {{{
|
||||
(comment) @comment
|
||||
|
||||
|
|
8
test/highlight/functions.tig
Normal file
8
test/highlight/functions.tig
Normal file
|
@ -0,0 +1,8 @@
|
|||
primitive print(s: string)
|
||||
/* ^ function */
|
||||
/* ^ variable.parameter */
|
||||
|
||||
function func(a: int) : int = (print("Hello World!"); a)
|
||||
/* ^ function */
|
||||
/* ^ variable.parameter */
|
||||
/* ^ function */
|
|
@ -22,8 +22,8 @@ var array := int_array[12] of 27;
|
|||
/* ^ type */
|
||||
|
||||
primitive func(a: int, b: string) : array
|
||||
/* ^ variable */
|
||||
/* ^ variable.parameter */
|
||||
/* ^ type */
|
||||
/* ^ variable */
|
||||
/* ^ variable.parameter */
|
||||
/* ^ type */
|
||||
/* ^ type */
|
||||
|
|
Loading…
Reference in a new issue