syntax: (\.)@<! -> \.@<!

This commit is contained in:
nfnty
2017-02-21 16:36:47 +01:00
parent 826ece295d
commit 51f3be4ec0

View File

@@ -91,7 +91,7 @@ if s:Python2Syntax()
syn match pythonFunction '[a-zA-Z_][a-zA-Z0-9_]*' nextgroup=FunctionParameters display contained syn match pythonFunction '[a-zA-Z_][a-zA-Z0-9_]*' nextgroup=FunctionParameters display contained
else else
syn keyword pythonStatement as nonlocal syn keyword pythonStatement as nonlocal
syn match pythonStatement '\v(\.)@<!<await>' syn match pythonStatement '\v\.@<!<await>'
syn match pythonFunction '[a-zA-Z_][a-zA-Z0-9_]*' nextgroup=FunctionParameters display contained syn match pythonFunction '[a-zA-Z_][a-zA-Z0-9_]*' nextgroup=FunctionParameters display contained
syn match pythonStatement '\<async\s\+def\>' nextgroup=pythonFunction skipwhite syn match pythonStatement '\<async\s\+def\>' nextgroup=pythonFunction skipwhite
syn match pythonStatement '\<async\s\+with\>' syn match pythonStatement '\<async\s\+with\>'
@@ -358,7 +358,7 @@ if s:Enabled('g:python_highlight_builtin_objs')
syn keyword pythonNone None syn keyword pythonNone None
syn keyword pythonBoolean True False syn keyword pythonBoolean True False
syn keyword pythonBuiltinObj Ellipsis NotImplemented syn keyword pythonBuiltinObj Ellipsis NotImplemented
syn match pythonBuiltinObj '\v(\.)@<!<(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>' nextgroup=FunctionParameters syn match pythonBuiltinObj '\v\.@<!<(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>' nextgroup=FunctionParameters
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__ syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
syn keyword pythonBuiltinObj __loader__ __spec__ __path__ __cached__ syn keyword pythonBuiltinObj __loader__ __spec__ __path__ __cached__
endif endif
@@ -369,27 +369,27 @@ endif
if s:Enabled('g:python_highlight_builtin_funcs') if s:Enabled('g:python_highlight_builtin_funcs')
if s:Python2Syntax() if s:Python2Syntax()
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(apply|basestring|buffer|callable|coerce)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(apply|basestring|buffer|callable|coerce)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(execfile|file|help|intern|long|raw_input)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(execfile|file|help|intern|long|raw_input)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(reduce|reload|unichr|unicode|xrange)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(reduce|reload|unichr|unicode|xrange)>\ze\(' nextgroup=FunctionParameters
if s:Enabled('g:python_print_as_function') if s:Enabled('g:python_print_as_function')
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(print)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(print)>\ze\(' nextgroup=FunctionParameters
endif endif
else else
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(ascii|exec|memoryview|print)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(ascii|exec|memoryview|print)>\ze\(' nextgroup=FunctionParameters
endif endif
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(__import__|abs|all|any)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(__import__|abs|all|any)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(bin|chr|classmethod|cmp|compile|complex)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(bin|chr|classmethod|cmp|compile|complex)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(delattr|dir|divmod|enumerate|eval)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(delattr|dir|divmod|enumerate|eval)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(filter|format|getattr)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(filter|format|getattr)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(globals|hasattr|hash|hex|id)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(globals|hasattr|hash|hex|id)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(input|isinstance)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(input|isinstance)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(issubclass|iter|len|locals|map|max)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(issubclass|iter|len|locals|map|max)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(min|next|oct|open|ord)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(min|next|oct|open|ord)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(pow|property|range)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(pow|property|range)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(repr|reversed|round|setattr)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(repr|reversed|round|setattr)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(slice|sorted|staticmethod|sum|super)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(slice|sorted|staticmethod|sum|super)>\ze\(' nextgroup=FunctionParameters
syn match pythonBuiltinFunc '\v(\.)@<!\zs<(type|vars|zip)>\ze\(' nextgroup=FunctionParameters syn match pythonBuiltinFunc '\v\.@<!\zs<(type|vars|zip)>\ze\(' nextgroup=FunctionParameters
endif endif
" "
@@ -398,36 +398,36 @@ endif
if s:Enabled('g:python_highlight_exceptions') if s:Enabled('g:python_highlight_exceptions')
if s:Python2Syntax() if s:Python2Syntax()
syn match pythonExClass '\v(\.)@<!\zs<(StandardError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(StandardError)>' nextgroup=FunctionParameters
else else
syn match pythonExClass '\v(\.)@<!\zs<(BlockingIOError|ChildProcessError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(BlockingIOError|ChildProcessError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(ConnectionError|BrokenPipeError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(ConnectionError|BrokenPipeError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(ConnectionAbortedError|ConnectionRefusedError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(ConnectionAbortedError|ConnectionRefusedError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(ConnectionResetError|FileExistsError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(ConnectionResetError|FileExistsError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(FileNotFoundError|InterruptedError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(FileNotFoundError|InterruptedError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(IsADirectoryError|NotADirectoryError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(IsADirectoryError|NotADirectoryError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(PermissionError|ProcessLookupError TimeoutError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(PermissionError|ProcessLookupError TimeoutError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(StopAsyncIteration|ResourceWarning)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(StopAsyncIteration|ResourceWarning)>' nextgroup=FunctionParameters
endif endif
syn match pythonExClass '\v(\.)@<!<(BaseException|Exception|ArithmeticError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!<(BaseException|Exception|ArithmeticError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(LookupError|EnvironmentError|AssertionError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(LookupError|EnvironmentError|AssertionError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(AttributeError|BufferError|EOFError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(AttributeError|BufferError|EOFError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(FloatingPointError|GeneratorExit|IOError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(FloatingPointError|GeneratorExit|IOError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(ImportError|IndexError|KeyError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(ImportError|IndexError|KeyError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(KeyboardInterrupt|MemoryError|NameError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(KeyboardInterrupt|MemoryError|NameError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(NotImplementedError|OSError|OverflowError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(NotImplementedError|OSError|OverflowError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(ReferenceError|RuntimeError|StopIteration)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(ReferenceError|RuntimeError|StopIteration)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(SyntaxError|IndentationError|TabError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(SyntaxError|IndentationError|TabError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(SystemError|SystemExit|TypeError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(SystemError|SystemExit|TypeError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(UnboundLocalError|UnicodeError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(UnboundLocalError|UnicodeError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(UnicodeEncodeError|UnicodeDecodeError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(UnicodeEncodeError|UnicodeDecodeError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(UnicodeTranslateError|ValueError|VMSError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(UnicodeTranslateError|ValueError|VMSError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(WindowsError|ZeroDivisionError)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(WindowsError|ZeroDivisionError)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(Warning|UserWarning|BytesWarning|DeprecationWarning)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(Warning|UserWarning|BytesWarning|DeprecationWarning)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(PendingDepricationWarning|SyntaxWarning)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(PendingDepricationWarning|SyntaxWarning)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(RuntimeWarning|FutureWarning)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(RuntimeWarning|FutureWarning)>' nextgroup=FunctionParameters
syn match pythonExClass '\v(\.)@<!\zs<(ImportWarning|UnicodeWarning)>' nextgroup=FunctionParameters syn match pythonExClass '\v\.@<!\zs<(ImportWarning|UnicodeWarning)>' nextgroup=FunctionParameters
endif endif
if s:Enabled('g:python_slow_sync') if s:Enabled('g:python_slow_sync')