[3.10] Allow the parser to avoid nested processing of invalid rules (GH-31252). (GH-31257)

(cherry picked from commit 390459de6d)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Pablo Galindo Salgado 2022-02-10 14:38:31 +00:00 committed by GitHub
parent 9f5145403b
commit 14284b0e71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1721 additions and 1721 deletions

View file

@ -231,7 +231,7 @@ class ExceptionTests(unittest.TestCase):
check('a = « hello » « world »', 1, 5)
check('[\nfile\nfor str(file)\nin\n[]\n]', 3, 5)
check('[file for\n str(file) in []]', 2, 2)
check("ages = {'Alice'=22, 'Bob'=23}", 1, 16)
check("ages = {'Alice'=22, 'Bob'=23}", 1, 9)
check('match ...:\n case {**rest, "key": value}:\n ...', 2, 19)
check("[a b c d e f]", 1, 2)
check("for x yfff:", 1, 7)