@@ -206,10 +206,6 @@ static char *Call_fields[]={
206206 "starargs" ,
207207 "kwargs" ,
208208};
209- static PyTypeObject * Repr_type ;
210- static char * Repr_fields []= {
211- "value" ,
212- };
213209static PyTypeObject * Num_type ;
214210static char * Num_fields []= {
215211 "n" ,
@@ -532,8 +528,6 @@ static int init_types(void)
532528 if (!Compare_type ) return 0 ;
533529 Call_type = make_type ("Call" , expr_type , Call_fields , 5 );
534530 if (!Call_type ) return 0 ;
535- Repr_type = make_type ("Repr" , expr_type , Repr_fields , 1 );
536- if (!Repr_type ) return 0 ;
537531 Num_type = make_type ("Num" , expr_type , Num_fields , 1 );
538532 if (!Num_type ) return 0 ;
539533 Str_type = make_type ("Str" , expr_type , Str_fields , 1 );
@@ -1552,27 +1546,6 @@ Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty starargs,
15521546 return p ;
15531547}
15541548
1555- expr_ty
1556- Repr (expr_ty value , int lineno , int col_offset , PyArena * arena )
1557- {
1558- expr_ty p ;
1559- if (!value ) {
1560- PyErr_SetString (PyExc_ValueError ,
1561- "field value is required for Repr" );
1562- return NULL ;
1563- }
1564- p = (expr_ty )PyArena_Malloc (arena , sizeof (* p ));
1565- if (!p ) {
1566- PyErr_NoMemory ();
1567- return NULL ;
1568- }
1569- p -> kind = Repr_kind ;
1570- p -> v .Repr .value = value ;
1571- p -> lineno = lineno ;
1572- p -> col_offset = col_offset ;
1573- return p ;
1574- }
1575-
15761549expr_ty
15771550Num (object n , int lineno , int col_offset , PyArena * arena )
15781551{
@@ -2544,15 +2517,6 @@ ast2obj_expr(void* _o)
25442517 goto failed ;
25452518 Py_DECREF (value );
25462519 break ;
2547- case Repr_kind :
2548- result = PyType_GenericNew (Repr_type , NULL , NULL );
2549- if (!result ) goto failed ;
2550- value = ast2obj_expr (o -> v .Repr .value );
2551- if (!value ) goto failed ;
2552- if (PyObject_SetAttrString (result , "value" , value ) == -1 )
2553- goto failed ;
2554- Py_DECREF (value );
2555- break ;
25562520 case Num_kind :
25572521 result = PyType_GenericNew (Num_type , NULL , NULL );
25582522 if (!result ) goto failed ;
@@ -3113,7 +3077,6 @@ init_ast(void)
31133077 if (PyDict_SetItemString (d , "Compare" , (PyObject * )Compare_type ) < 0 )
31143078 return ;
31153079 if (PyDict_SetItemString (d , "Call" , (PyObject * )Call_type ) < 0 ) return ;
3116- if (PyDict_SetItemString (d , "Repr" , (PyObject * )Repr_type ) < 0 ) return ;
31173080 if (PyDict_SetItemString (d , "Num" , (PyObject * )Num_type ) < 0 ) return ;
31183081 if (PyDict_SetItemString (d , "Str" , (PyObject * )Str_type ) < 0 ) return ;
31193082 if (PyDict_SetItemString (d , "Attribute" , (PyObject * )Attribute_type ) <
0 commit comments