Skip to content

Commit aaf6ad6

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 2cc00ba commit aaf6ad6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

syntax/python.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ endif
8282
syn keyword pythonRepeat for while
8383
syn keyword pythonConditional if elif else
8484
syn keyword pythonException try except finally
85+
syn keyword pythonMatch match case
8586
" The standard pyrex.vim unconditionally removes the pythonInclude group, so
8687
" we provide a dummy group here to avoid crashing pyrex.vim.
8788
syn keyword pythonInclude import
@@ -105,7 +106,7 @@ else
105106
syn match pythonStatement '\<async\s\+def\>' nextgroup=pythonFunction skipwhite
106107
syn match pythonStatement '\<async\s\+with\>'
107108
syn match pythonStatement '\<async\s\+for\>'
108-
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
109+
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
109110
endif
110111

111112

@@ -434,6 +435,7 @@ if v:version >= 508 || !exists('did_python_syn_inits')
434435
HiLink pythonFunction Function
435436
HiLink pythonFunctionCall Function
436437
HiLink pythonConditional Conditional
438+
HiLink pythonMatch Conditional
437439
HiLink pythonRepeat Repeat
438440
HiLink pythonException Exception
439441
HiLink pythonOperator Operator

0 commit comments

Comments
 (0)