gh-133194: Add CHECK_VERSION to new PEP758 grammar (#133195)

This commit is contained in:
sobolevn 2025-04-30 13:39:26 +03:00 committed by GitHub
parent 44e4c479fb
commit b1f893875b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 4 deletions

4
Parser/parser.c generated
View file

@ -7140,7 +7140,7 @@ except_block_rule(Parser *p)
UNUSED(_end_lineno); // Only used by EXTRA macro
int _end_col_offset = _token->end_col_offset;
UNUSED(_end_col_offset); // Only used by EXTRA macro
_res = _PyAST_ExceptHandler ( e , NULL , b , EXTRA );
_res = CHECK_VERSION ( excepthandler_ty , 14 , "except expressions without parentheses" , _PyAST_ExceptHandler ( e , NULL , b , EXTRA ) );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
p->level--;
@ -7342,7 +7342,7 @@ except_star_block_rule(Parser *p)
UNUSED(_end_lineno); // Only used by EXTRA macro
int _end_col_offset = _token->end_col_offset;
UNUSED(_end_col_offset); // Only used by EXTRA macro
_res = _PyAST_ExceptHandler ( e , NULL , b , EXTRA );
_res = CHECK_VERSION ( excepthandler_ty , 14 , "except expressions without parentheses" , _PyAST_ExceptHandler ( e , NULL , b , EXTRA ) );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
p->level--;