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:
parent
91e6f7841c
commit
7d6dce936a
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
; Operators {{{
|
; Operators {{{
|
||||||
(operator) @operator
|
(operator) @operator
|
||||||
|
|
||||||
|
(integer_literal ("-") @operator)
|
||||||
; }}}
|
; }}}
|
||||||
|
|
||||||
; Literal {{{
|
; Literal {{{
|
||||||
|
|
|
@ -2,7 +2,7 @@ foo = 0
|
||||||
// ^ number
|
// ^ number
|
||||||
|
|
||||||
foo = -42
|
foo = -42
|
||||||
// ^ number
|
// ^ number
|
||||||
|
|
||||||
foo = true
|
foo = true
|
||||||
// ^ boolean
|
// ^ boolean
|
||||||
|
|
|
@ -5,4 +5,5 @@ foo += 1
|
||||||
// ^ operator
|
// ^ operator
|
||||||
|
|
||||||
foo = -1 + 2
|
foo = -1 + 2
|
||||||
|
// ^ operator
|
||||||
// ^ operator
|
// ^ operator
|
||||||
|
|
Loading…
Reference in a new issue