Account for '-' as an operator

For syntax purposes it's part of the number, but it looks better when
highlighted as an operator.
This commit is contained in:
Bruno BELANYI 2024-04-08 20:58:17 +01:00
parent 91e6f7841c
commit 7d6dce936a
3 changed files with 4 additions and 1 deletions

View file

@ -5,6 +5,8 @@
; Operators {{{
(operator) @operator
(integer_literal ("-") @operator)
; }}}
; Literal {{{

View file

@ -2,7 +2,7 @@ foo = 0
// ^ number
foo = -42
// ^ number
// ^ number
foo = true
// ^ boolean

View file

@ -5,4 +5,5 @@ foo += 1
// ^ operator
foo = -1 + 2
// ^ operator
// ^ operator