gh-135422: Fix regression in SyntaxError messages after #134036 (#135423)

This commit is contained in:
sobolevn 2025-06-30 21:52:26 +03:00 committed by GitHub
parent fc82cb91ba
commit 7e33558455
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 2509 additions and 2505 deletions

View file

@ -184,8 +184,9 @@ return_stmt[stmt_ty]:
| 'return' a=[star_expressions] { _PyAST_Return(a, EXTRA) }
raise_stmt[stmt_ty]:
| 'raise' a=expression 'from' b=expression { _PyAST_Raise(a, b, EXTRA) }
| invalid_raise_stmt
| 'raise' a=expression b=['from' z=expression { z }] { _PyAST_Raise(a, b, EXTRA) }
| 'raise' a=expression { _PyAST_Raise(a, NULL, EXTRA) }
| 'raise' { _PyAST_Raise(NULL, NULL, EXTRA) }
pass_stmt[stmt_ty]: