diff options
author | Yuriy | 2022-11-01 17:01:01 +0000 |
---|---|---|
committer | Michael Davis | 2022-11-02 01:10:11 +0000 |
commit | e0b034dcd1a99683efa429e55657dd68ebd9a301 (patch) | |
tree | b1d62ee7a8fac35603b8908b15ea4c6e7466e4d2 /runtime/queries/python | |
parent | db3383c76e93a696a7dedb8b644ba12b379da9b4 (diff) |
Add syntax highlighting for Python pattern matching
Add syntax highlighting for `match` and `case` keywords in Python
(https://peps.python.org/pep-0636/).
Diffstat (limited to 'runtime/queries/python')
-rw-r--r-- | runtime/queries/python/highlights.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm index a94d7caf..70b91efb 100644 --- a/runtime/queries/python/highlights.scm +++ b/runtime/queries/python/highlights.scm @@ -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 [ |