Skip to content

Commit e58383c

Browse files
mdomkeAbrosimov-a-a
authored andcommitted
Add support for match expression
This is based on the work of [@g15ecb](https://github.com/g15ecb) g15ecb@988efe9
1 parent 65f6d31 commit e58383c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

syntax/python.vim

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ if s:Enabled('g:python_highlight_class_vars')
8383
endif
8484
syn keyword pythonRepeat for while
8585
syn keyword pythonConditional if elif else
86+
syn keyword pythonMatch match case
8687
syn keyword pythonException try except finally raise
8788
syn keyword pythonException raise nextgroup=pythonExClass skipwhite
8889
" The standard pyrex.vim unconditionally removes the pythonInclude group, so
@@ -114,7 +115,7 @@ else
114115
syn match pythonStatement '\<async\s\+def\>' nextgroup=pythonFunction skipwhite
115116
syn match pythonStatement '\<async\s\+with\>'
116117
syn match pythonStatement '\<async\s\+for\>'
117-
syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonFString,pythonRawString,pythonRawFString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType,pythonClassVar
118+
syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonMatch,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonFString,pythonRawString,pythonRawFString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType,pythonClassVar
118119
endif
119120

120121

@@ -445,6 +446,7 @@ if v:version >= 508 || !exists('did_python_syn_inits')
445446
HiLink pythonFunction Function
446447
HiLink pythonFunctionCall Function
447448
HiLink pythonConditional Conditional
449+
HiLink pythonMatch Conditional
448450
HiLink pythonRepeat Repeat
449451
HiLink pythonException Exception
450452
HiLink pythonOperator Operator

0 commit comments

Comments
 (0)