Format PatternMatchSequence (#6676)

This commit is contained in:
Harutaka Kawamura 2023-08-23 09:44:33 +09:00 committed by GitHub
parent c34a342ab4
commit 94f5f18ddb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 353 additions and 143 deletions

View file

@ -172,6 +172,7 @@ match x:
case (a as b) as c:
pass
match pattern_singleton:
case (
# leading 1
@ -187,3 +188,30 @@ match pattern_singleton:
...
case False:
...
match foo:
case "a", "b":
pass
case "a", "b",:
pass
case ("a", "b"):
pass
case ["a", "b"]:
pass
case (["a", "b"]):
pass
match foo:
case [ # leading
# leading
# leading
# leading
"a", # trailing
# trailing
# trailing
# trailing
"b",
]:
pass