Add operators highlighting

This commit is contained in:
Bruno BELANYI 2022-06-03 10:08:58 +02:00
parent d83fa3acb7
commit 6e40691a35
2 changed files with 61 additions and 0 deletions

View file

@ -29,4 +29,23 @@
(string_literal) @string
; }}}
; Operators {{{
(operator) @operator
[
","
";"
"."
] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
; }}}
; vim: sw=2 foldmethod=marker

View file

@ -0,0 +1,42 @@
(
/* <- punctuation.bracket */
-1 | 2 & 3 + 4 * 5;
/* <- operator */
/* ^ operator */
/* ^ operator */
/* ^ operator */
/* ^ operator */
/* ^ punctuation.delimiter */
12 >= 27;
/* ^ operator */
12 <= 27;
/* ^ operator */
12 = 27;
/* ^ operator */
12 <> 27;
/* ^ operator */
12 < 27;
/* ^ operator */
12 > 27;
/* ^ operator */
record.field;
/* ^ punctuation.delimiter */
func(a, b);
/* ^ punctuation.bracket */
/* ^ punctuation.bracket */
/* ^ punctuation.delimiter */
record_type { };
/* ^ punctuation.bracket */
/* ^ punctuation.bracket */
array[42]
/* ^ punctuation.bracket */
/* ^ punctuation.bracket */
)
/* <- punctuation.bracket */