Add syntax highlighting for Python pattern matching

Add syntax highlighting for `match` and `case` keywords in Python
(https://peps.python.org/pep-0636/).
pull/4576/head
Yuriy 2 years ago committed by Michael Davis
parent db3383c76e
commit e0b034dcd1

@ -2,7 +2,7 @@
(dotted_name
(identifier)* @namespace)
(aliased_import
alias: (identifier) @namespace)
@ -67,7 +67,7 @@
(parameters
(dictionary_splat_pattern ; **kwargs
(identifier) @variable.parameter))
(lambda_parameters
(identifier) @variable.parameter)
@ -97,7 +97,7 @@
(#match? @constant "^[A-Z_]{2,}$"))
((identifier) @type
(#match? @type "^[A-Z]"))
(#match? @type "^[A-Z]"))
(attribute attribute: (identifier) @variable.other.member)
(identifier) @variable
@ -168,6 +168,8 @@
"if"
"elif"
"else"
"match"
"case"
] @keyword.control.conditional
[

Loading…
Cancel
Save