@@ -707,12 +707,12 @@ class_def
707
707
$$ = CLASS_01($1, $3, $5, @$); }
708
708
| decorators_opt KW_CLASS id "(" expr_list_opt ")" ":" body_stmts {
709
709
$$ = CLASS_02($1, $3, $5, $8, @$); }
710
- | decorators_opt KW_CLASS id "(" expr_list "," keyword_items ")"
711
- ":" body_stmts { $$ = CLASS_03($1, $3, $5, $7, $10 , @$); }
710
+ | decorators_opt KW_CLASS id "(" expr_list "," keyword_items comma_opt ")"
711
+ ":" body_stmts { $$ = CLASS_03($1, $3, $5, $7, $11 , @$); }
712
712
| decorators_opt KW_CLASS id "(" keyword_items "," expr_list ")"
713
713
":" body_stmts { $$ = CLASS_03($1, $3, $7, $5, $10, @$); }
714
- | decorators_opt KW_CLASS id "(" keyword_items ")" ":" body_stmts {
715
- $$ = CLASS_04($1, $3, $5, $8 , @$); }
714
+ | decorators_opt KW_CLASS id "(" keyword_items comma_opt ")" ":" body_stmts
715
+ { $$ = CLASS_04($1, $3, $5, $9 , @$); }
716
716
;
717
717
718
718
async_func_def
@@ -770,7 +770,7 @@ while_statement
770
770
;
771
771
772
772
expr_list_opt
773
- : expr_list { $$ = $1; }
773
+ : expr_list comma_opt { $$ = $1; }
774
774
| %empty { LIST_NEW($$); }
775
775
;
776
776
@@ -1002,7 +1002,6 @@ expr
1002
1002
| function_call { $$ = $1; }
1003
1003
| subscript { $$ = $1; }
1004
1004
| "[" expr_list_opt "]" { $$ = LIST($2, @$); }
1005
- | "[" expr_list "," "]" { $$ = LIST($2, @$); }
1006
1005
| "{" expr_list "}" { $$ = SET($2, @$); }
1007
1006
| "{" expr_list "," "}" { $$ = SET($2, @$); }
1008
1007
| expr "." id { $$ = ATTRIBUTE_REF($1, $3, @$); }
0 commit comments