Implement FormatPatternMatchValue (#6799)

## Summary

This is effectively #6608, but with additional tests.

We aren't properly handling parenthesized patterns, but that needs to be
dealt with separately as it's somewhat involved.

Closes #6555
This commit is contained in:
Charlie Marsh 2023-08-23 10:01:14 -04:00 committed by GitHub
parent 4bdd99f882
commit 71c25e4f9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 189 additions and 407 deletions

View file

@ -236,3 +236,30 @@ match foo:
"b",
]:
pass
match foo:
case 1:
y = 0
case (1):
y = 1
case (("a")):
y = 1
case ( # comment
1
):
y = 1
case (
# comment
1
):
y = 1
case (
1 # comment
):
y = 1
case (
1
# comment
):
y = 1