|
|
|
|
154
|
syn keyword pythonStatement exec return
|
154
|
syn keyword pythonStatement exec return
|
155
|
syn keyword pythonStatement pass raise
|
155
|
syn keyword pythonStatement pass raise
|
156
|
syn keyword pythonStatement global assert
|
156
|
syn keyword pythonStatement global assert
|
157
|
-syn keyword pythonStatement lambda
|
|
|
158
|
syn keyword pythonStatement with
|
157
|
syn keyword pythonStatement with
|
159
|
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
|
158
|
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
|
160
|
syn keyword pythonRepeat for while
|
159
|
syn keyword pythonRepeat for while
|
|
|
|
|
166
|
syn match pythonIdentifier "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" nextgroup=pythonFuncArgs,pythonTypeAnno display
|
165
|
syn match pythonIdentifier "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" nextgroup=pythonFuncArgs,pythonTypeAnno display
|
167
|
syn keyword pythonException try except finally
|
166
|
syn keyword pythonException try except finally
|
168
|
syn keyword pythonOperator and in is not or
|
167
|
syn keyword pythonOperator and in is not or
|
|
|
168
|
+syn match pythonLambdaExpr "\<lambda[^:]*:"he=s+6 display nextgroup=@pythonExpression
|
|
|
169
|
+"syn keyword pythonStatement lambda
|
169
|
|
170
|
|
170
|
syn region pythonDictSetExpr matchgroup=pythonDictSetExpr start='{' end='}' contains=@pythonExpression
|
171
|
syn region pythonDictSetExpr matchgroup=pythonDictSetExpr start='{' end='}' contains=@pythonExpression
|
|
|
172
|
+syn region pythonListSliceExpr matchgroup=pythonListSliceExpr start='\[' end='\]' contains=@pythonExpression
|
171
|
syn region pythonFuncArgs matchgroup=pythonFuncArgs start='(' end=')' contained contains=pythonTypeAnno,@pythonExpression
|
173
|
syn region pythonFuncArgs matchgroup=pythonFuncArgs start='(' end=')' contained contains=pythonTypeAnno,@pythonExpression
|
172
|
|
174
|
|
173
|
syn match pythonTypeAnno ":\s*\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"hs=s+1 display contained contains=pythonType nextgroup=pythonTypeArgs
|
175
|
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
|
|
|
|
|
176
|
+syn match pythonTypeAnnoReturn "->\s*\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contains=pythonType nextgroup=pythonTypeArgs
|
175
|
syn region pythonTypeArgs matchgroup=pythonTypeArgs start='\[' end='\]' display contained contains=pythonType,pythonTypeArgs
|
177
|
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
|
178
|
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
|
179
|
syn keyword pythonType AbstractSet MutableSet Mapping MutableMapping Sequence MutableSequence ByteString Deque List contained
|
|
|
|
|
203
|
syn cluster pythonExpression contains=
|
205
|
syn cluster pythonExpression contains=
|
204
|
\ pythonFuncArgs,
|
206
|
\ pythonFuncArgs,
|
205
|
\ pythonDictSetExpr,
|
207
|
\ pythonDictSetExpr,
|
|
|
208
|
+ \ pythonListSliceExpr,
|
|
|
209
|
+ \ pythonLambdaExpr,
|
206
|
\ pythonStatement,
|
210
|
\ pythonStatement,
|
207
|
\ pythonRepeat,
|
211
|
\ pythonRepeat,
|
208
|
\ pythonConditional,
|
212
|
\ pythonConditional,
|
|
|
|
|
225
|
|
229
|
|
226
|
syn cluster pythonFExpression contains=
|
230
|
syn cluster pythonFExpression contains=
|
227
|
\ pythonStatement,
|
231
|
\ pythonStatement,
|
|
|
232
|
+ \ pythonDictSetExpr,
|
|
|
233
|
+ \ pythonListSliceExpr,
|
|
|
234
|
+ \ pythonLambdaExpr,
|
228
|
\ pythonRepeat,
|
235
|
\ pythonRepeat,
|
229
|
\ pythonConditional,
|
236
|
\ pythonConditional,
|
230
|
\ pythonOperator,
|
237
|
\ pythonOperator,
|
|
|
|
|
559
|
endif
|
566
|
endif
|
560
|
|
567
|
|
561
|
HiLink pythonStatement Statement
|
568
|
HiLink pythonStatement Statement
|
|
|
569
|
+ HiLink pythonLambdaExpr Statement
|
562
|
HiLink pythonImport Include
|
570
|
HiLink pythonImport Include
|
563
|
HiLink pythonFunction Function
|
571
|
HiLink pythonFunction Function
|
564
|
HiLink pythonConditional Conditional
|
572
|
HiLink pythonConditional Conditional
|