From 39ba0d8a0484756fbd26b14219b7aa2312e0b49e Mon Sep 17 00:00:00 2001 From: nfnty Date: Fri, 24 Feb 2017 22:55:41 +0100 Subject: [PATCH] Fix operators `<<=` and `>>=` --- syntax/python.vim | 2 +- tests/test.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/syntax/python.vim b/syntax/python.vim index 882d9e2..c0ea4e9 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -107,7 +107,7 @@ syn keyword pythonOperator and in is not or if s:Enabled('g:python_highlight_operators') syn match pythonOperator '\V=\|-\|+\|*\|@\|/\|%\|&\||\|^\|~\|<\|>\|!=' endif -syn match pythonError '[$?]\|\([-+@%&|^~]\)\1\{1,}\|\([=*/<>]\)\2\{2,}\|\([-=+*@/%&|^~<>]\)\3\@![-+*@/%&|^~<>]\|[]\+=\{2,}\|[]\{2,}=\+' display +syn match pythonError '[$?]\|\([-+@%&|^~]\)\1\{1,}\|\([=*/<>]\)\2\{2,}\|\([-=+*@/%&|^~<>]\)\3\@![-+*@/%&|^~<>]\|[]\+=\{2,}\|!\{2,}=\+' display " " Decorators (new in Python 2.4) diff --git a/tests/test.py b/tests/test.py index 12b8fc8..667ccb7 100644 --- a/tests/test.py +++ b/tests/test.py @@ -69,18 +69,22 @@ RuntimeWarning FutureWarning ImportWarning UnicodeWarning # Operators and or in is not -= + - + * ** @ / // % & | ^ ~ << >> < <= == != >= > += +-= += *= **= @= /= //= %= +&= |= ^= ~= <<= >>= + # Erroneous operators $ ? === -- ++ *** @@ /// %% && || ^^ ~~ <<< >>> -<== <<= !== !!= >== >>= +<== !== !!= >== %- +- -+ # Numbers