syntax: python: colorize also the match and case keywords

These keywords were introduced in Python-3.10:
  https://docs.python.org/3/whatsnew/3.10.html#pep-634-structural-pattern-matching

Reported-by: Stanislaw Majewski <essdoem@yahoo.com>
This commit is contained in:
Benno Schulenberg
2026-02-03 16:37:37 +01:00
parent 46a015c624
commit bf194dae5d

View File

@@ -11,9 +11,9 @@ linter pyflakes
# Function definitions.
color brightblue "def [[:alnum:]_]+"
# Keywords.
color brightcyan "\<(and|as|assert|async|await|break|class|continue)\>"
color brightcyan "\<(and|as|assert|async|await|break|case|class|continue)\>"
color brightcyan "\<(def|del|elif|else|except|finally|for|from)\>"
color brightcyan "\<(global|if|import|in|is|lambda|nonlocal|not|or)\>"
color brightcyan "\<(global|if|import|in|is|match|lambda|nonlocal|not|or)\>"
color brightcyan "\<(pass|raise|return|try|while|with|yield)\>"
# These two are keywords in Python 2, but functions in Python 3,