@@ -3031,9 +3031,9 @@ for_stmt_rule(Parser *p)
30313031}
30323032
30333033// with_stmt:
3034- // | 'with' '(' ','.with_item+ ')' ':' block
3034+ // | 'with' '(' ','.with_item+ ','? ' )' ':' block
30353035// | 'with' ','.with_item+ ':' TYPE_COMMENT? block
3036- // | ASYNC 'with' '(' ','.with_item+ ')' ':' block
3036+ // | ASYNC 'with' '(' ','.with_item+ ','? ' )' ':' block
30373037// | ASYNC 'with' ','.with_item+ ':' TYPE_COMMENT? block
30383038static stmt_ty
30393039with_stmt_rule (Parser * p )
@@ -3051,20 +3051,24 @@ with_stmt_rule(Parser *p)
30513051 UNUSED (start_lineno ); // Only used by EXTRA macro
30523052 int start_col_offset = p -> tokens [mark ]-> col_offset ;
30533053 UNUSED (start_col_offset ); // Only used by EXTRA macro
3054- { // 'with' '(' ','.with_item+ ')' ':' block
3054+ { // 'with' '(' ','.with_item+ ','? ' )' ':' block
30553055 asdl_seq * a ;
30563056 asdl_seq * b ;
30573057 Token * keyword ;
30583058 Token * literal ;
30593059 Token * literal_1 ;
30603060 Token * literal_2 ;
3061+ void * opt_var ;
3062+ UNUSED (opt_var ); // Silence compiler warnings
30613063 if (
30623064 (keyword = _PyPegen_expect_token (p , 519 ))
30633065 &&
30643066 (literal = _PyPegen_expect_token (p , 7 ))
30653067 &&
30663068 (a = _gather_38_rule (p ))
30673069 &&
3070+ (opt_var = _PyPegen_expect_token (p , 12 ), 1 )
3071+ &&
30683072 (literal_1 = _PyPegen_expect_token (p , 8 ))
30693073 &&
30703074 (literal_2 = _PyPegen_expect_token (p , 11 ))
@@ -3124,14 +3128,16 @@ with_stmt_rule(Parser *p)
31243128 }
31253129 p -> mark = mark ;
31263130 }
3127- { // ASYNC 'with' '(' ','.with_item+ ')' ':' block
3131+ { // ASYNC 'with' '(' ','.with_item+ ','? ' )' ':' block
31283132 asdl_seq * a ;
31293133 Token * async_var ;
31303134 asdl_seq * b ;
31313135 Token * keyword ;
31323136 Token * literal ;
31333137 Token * literal_1 ;
31343138 Token * literal_2 ;
3139+ void * opt_var ;
3140+ UNUSED (opt_var ); // Silence compiler warnings
31353141 if (
31363142 (async_var = _PyPegen_expect_token (p , ASYNC ))
31373143 &&
@@ -3141,6 +3147,8 @@ with_stmt_rule(Parser *p)
31413147 &&
31423148 (a = _gather_42_rule (p ))
31433149 &&
3150+ (opt_var = _PyPegen_expect_token (p , 12 ), 1 )
3151+ &&
31443152 (literal_1 = _PyPegen_expect_token (p , 8 ))
31453153 &&
31463154 (literal_2 = _PyPegen_expect_token (p , 11 ))
0 commit comments