Add functions high-lighting

This commit is contained in:
Bruno BELANYI 2022-06-03 19:59:56 +02:00
parent 67b555c381
commit 62a601469e
3 changed files with 22 additions and 2 deletions

View file

@ -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

View 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 */

View file

@ -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 */