Преглед изворни кода

Fix highlighting function return type annotation

Joongi Kim пре 8 година
родитељ
комит
d47e205ccd
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1
    1
      syntax/python.vim

+ 1
- 1
syntax/python.vim Прегледај датотеку

171
 syn region pythonFuncArgs    matchgroup=pythonFuncArgs    start='(' end=')' contained contains=pythonTypeAnno,@pythonExpression
171
 syn region pythonFuncArgs    matchgroup=pythonFuncArgs    start='(' end=')' contained contains=pythonTypeAnno,@pythonExpression
172
 
172
 
173
 syn match pythonTypeAnno ":\s*\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"hs=s+1 display contained contains=pythonType nextgroup=pythonTypeArgs
173
 syn match pythonTypeAnno ":\s*\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"hs=s+1 display contained contains=pythonType nextgroup=pythonTypeArgs
174
-syn match pythonTypeAnnoReturn "->\s*\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*:"hs=s+2,he=e-1 display contains=pythonType nextgroup=pythonTypeArgs
174
+syn match pythonTypeAnnoReturn "->\s*\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"hs=s+2,he=e-1 display contains=pythonType nextgroup=pythonTypeArgs
175
 syn region pythonTypeArgs matchgroup=pythonTypeArgs start='\[' end='\]' display contained contains=pythonType,pythonTypeArgs
175
 syn region pythonTypeArgs matchgroup=pythonTypeArgs start='\[' end='\]' display contained contains=pythonType,pythonTypeArgs
176
 syn keyword pythonType Any AnyStr Callable ClassVar Tuple Union Optional Type TypeVar None contained
176
 syn keyword pythonType Any AnyStr Callable ClassVar Tuple Union Optional Type TypeVar None contained
177
 syn keyword pythonType AbstractSet MutableSet Mapping MutableMapping Sequence MutableSequence ByteString Deque List contained
177
 syn keyword pythonType AbstractSet MutableSet Mapping MutableMapping Sequence MutableSequence ByteString Deque List contained