mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
According to the PEP 7, C code must "use 4-space indents"
Replace 8 spaces with 4.
This commit is contained in:
parent
6ca8a05f10
commit
ce72e1ce6c
3 changed files with 6154 additions and 6199 deletions
|
@ -8,7 +8,7 @@ import os, sys
|
||||||
|
|
||||||
import asdl
|
import asdl
|
||||||
|
|
||||||
TABSIZE = 8
|
TABSIZE = 4
|
||||||
MAX_COL = 80
|
MAX_COL = 80
|
||||||
|
|
||||||
def get_c_type(name):
|
def get_c_type(name):
|
||||||
|
|
|
@ -765,19 +765,18 @@ static int init_types(void)
|
||||||
if (!add_attributes(mod_type, NULL, 0)) return 0;
|
if (!add_attributes(mod_type, NULL, 0)) return 0;
|
||||||
Module_type = make_type("Module", mod_type, Module_fields, 1);
|
Module_type = make_type("Module", mod_type, Module_fields, 1);
|
||||||
if (!Module_type) return 0;
|
if (!Module_type) return 0;
|
||||||
Interactive_type = make_type("Interactive", mod_type,
|
Interactive_type = make_type("Interactive", mod_type, Interactive_fields,
|
||||||
Interactive_fields, 1);
|
|
||||||
if (!Interactive_type) return 0;
|
|
||||||
Expression_type = make_type("Expression", mod_type, Expression_fields,
|
|
||||||
1);
|
1);
|
||||||
|
if (!Interactive_type) return 0;
|
||||||
|
Expression_type = make_type("Expression", mod_type, Expression_fields, 1);
|
||||||
if (!Expression_type) return 0;
|
if (!Expression_type) return 0;
|
||||||
Suite_type = make_type("Suite", mod_type, Suite_fields, 1);
|
Suite_type = make_type("Suite", mod_type, Suite_fields, 1);
|
||||||
if (!Suite_type) return 0;
|
if (!Suite_type) return 0;
|
||||||
stmt_type = make_type("stmt", &AST_type, NULL, 0);
|
stmt_type = make_type("stmt", &AST_type, NULL, 0);
|
||||||
if (!stmt_type) return 0;
|
if (!stmt_type) return 0;
|
||||||
if (!add_attributes(stmt_type, stmt_attributes, 2)) return 0;
|
if (!add_attributes(stmt_type, stmt_attributes, 2)) return 0;
|
||||||
FunctionDef_type = make_type("FunctionDef", stmt_type,
|
FunctionDef_type = make_type("FunctionDef", stmt_type, FunctionDef_fields,
|
||||||
FunctionDef_fields, 5);
|
5);
|
||||||
if (!FunctionDef_type) return 0;
|
if (!FunctionDef_type) return 0;
|
||||||
ClassDef_type = make_type("ClassDef", stmt_type, ClassDef_fields, 7);
|
ClassDef_type = make_type("ClassDef", stmt_type, ClassDef_fields, 7);
|
||||||
if (!ClassDef_type) return 0;
|
if (!ClassDef_type) return 0;
|
||||||
|
@ -805,8 +804,7 @@ static int init_types(void)
|
||||||
if (!Assert_type) return 0;
|
if (!Assert_type) return 0;
|
||||||
Import_type = make_type("Import", stmt_type, Import_fields, 1);
|
Import_type = make_type("Import", stmt_type, Import_fields, 1);
|
||||||
if (!Import_type) return 0;
|
if (!Import_type) return 0;
|
||||||
ImportFrom_type = make_type("ImportFrom", stmt_type, ImportFrom_fields,
|
ImportFrom_type = make_type("ImportFrom", stmt_type, ImportFrom_fields, 3);
|
||||||
3);
|
|
||||||
if (!ImportFrom_type) return 0;
|
if (!ImportFrom_type) return 0;
|
||||||
Global_type = make_type("Global", stmt_type, Global_fields, 1);
|
Global_type = make_type("Global", stmt_type, Global_fields, 1);
|
||||||
if (!Global_type) return 0;
|
if (!Global_type) return 0;
|
||||||
|
@ -2352,11 +2350,9 @@ ast2obj_stmt(void* _o)
|
||||||
if (_PyObject_SetAttrId(result, &PyId_body, value) == -1)
|
if (_PyObject_SetAttrId(result, &PyId_body, value) == -1)
|
||||||
goto failed;
|
goto failed;
|
||||||
Py_DECREF(value);
|
Py_DECREF(value);
|
||||||
value = ast2obj_list(o->v.FunctionDef.decorator_list,
|
value = ast2obj_list(o->v.FunctionDef.decorator_list, ast2obj_expr);
|
||||||
ast2obj_expr);
|
|
||||||
if (!value) goto failed;
|
if (!value) goto failed;
|
||||||
if (_PyObject_SetAttrId(result, &PyId_decorator_list, value) ==
|
if (_PyObject_SetAttrId(result, &PyId_decorator_list, value) == -1)
|
||||||
-1)
|
|
||||||
goto failed;
|
goto failed;
|
||||||
Py_DECREF(value);
|
Py_DECREF(value);
|
||||||
value = ast2obj_expr(o->v.FunctionDef.returns);
|
value = ast2obj_expr(o->v.FunctionDef.returns);
|
||||||
|
@ -2398,11 +2394,9 @@ ast2obj_stmt(void* _o)
|
||||||
if (_PyObject_SetAttrId(result, &PyId_body, value) == -1)
|
if (_PyObject_SetAttrId(result, &PyId_body, value) == -1)
|
||||||
goto failed;
|
goto failed;
|
||||||
Py_DECREF(value);
|
Py_DECREF(value);
|
||||||
value = ast2obj_list(o->v.ClassDef.decorator_list,
|
value = ast2obj_list(o->v.ClassDef.decorator_list, ast2obj_expr);
|
||||||
ast2obj_expr);
|
|
||||||
if (!value) goto failed;
|
if (!value) goto failed;
|
||||||
if (_PyObject_SetAttrId(result, &PyId_decorator_list, value) ==
|
if (_PyObject_SetAttrId(result, &PyId_decorator_list, value) == -1)
|
||||||
-1)
|
|
||||||
goto failed;
|
goto failed;
|
||||||
Py_DECREF(value);
|
Py_DECREF(value);
|
||||||
break;
|
break;
|
||||||
|
@ -2792,8 +2786,7 @@ ast2obj_expr(void* _o)
|
||||||
if (_PyObject_SetAttrId(result, &PyId_elt, value) == -1)
|
if (_PyObject_SetAttrId(result, &PyId_elt, value) == -1)
|
||||||
goto failed;
|
goto failed;
|
||||||
Py_DECREF(value);
|
Py_DECREF(value);
|
||||||
value = ast2obj_list(o->v.ListComp.generators,
|
value = ast2obj_list(o->v.ListComp.generators, ast2obj_comprehension);
|
||||||
ast2obj_comprehension);
|
|
||||||
if (!value) goto failed;
|
if (!value) goto failed;
|
||||||
if (_PyObject_SetAttrId(result, &PyId_generators, value) == -1)
|
if (_PyObject_SetAttrId(result, &PyId_generators, value) == -1)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
@ -2807,8 +2800,7 @@ ast2obj_expr(void* _o)
|
||||||
if (_PyObject_SetAttrId(result, &PyId_elt, value) == -1)
|
if (_PyObject_SetAttrId(result, &PyId_elt, value) == -1)
|
||||||
goto failed;
|
goto failed;
|
||||||
Py_DECREF(value);
|
Py_DECREF(value);
|
||||||
value = ast2obj_list(o->v.SetComp.generators,
|
value = ast2obj_list(o->v.SetComp.generators, ast2obj_comprehension);
|
||||||
ast2obj_comprehension);
|
|
||||||
if (!value) goto failed;
|
if (!value) goto failed;
|
||||||
if (_PyObject_SetAttrId(result, &PyId_generators, value) == -1)
|
if (_PyObject_SetAttrId(result, &PyId_generators, value) == -1)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
@ -2827,8 +2819,7 @@ ast2obj_expr(void* _o)
|
||||||
if (_PyObject_SetAttrId(result, &PyId_value, value) == -1)
|
if (_PyObject_SetAttrId(result, &PyId_value, value) == -1)
|
||||||
goto failed;
|
goto failed;
|
||||||
Py_DECREF(value);
|
Py_DECREF(value);
|
||||||
value = ast2obj_list(o->v.DictComp.generators,
|
value = ast2obj_list(o->v.DictComp.generators, ast2obj_comprehension);
|
||||||
ast2obj_comprehension);
|
|
||||||
if (!value) goto failed;
|
if (!value) goto failed;
|
||||||
if (_PyObject_SetAttrId(result, &PyId_generators, value) == -1)
|
if (_PyObject_SetAttrId(result, &PyId_generators, value) == -1)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
@ -3807,8 +3798,8 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
|
||||||
} else {
|
} else {
|
||||||
returns = NULL;
|
returns = NULL;
|
||||||
}
|
}
|
||||||
*out = FunctionDef(name, args, body, decorator_list, returns,
|
*out = FunctionDef(name, args, body, decorator_list, returns, lineno,
|
||||||
lineno, col_offset, arena);
|
col_offset, arena);
|
||||||
if (*out == NULL) goto failed;
|
if (*out == NULL) goto failed;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -4204,8 +4195,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
|
||||||
PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from For");
|
PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from For");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*out = For(target, iter, body, orelse, lineno, col_offset,
|
*out = For(target, iter, body, orelse, lineno, col_offset, arena);
|
||||||
arena);
|
|
||||||
if (*out == NULL) goto failed;
|
if (*out == NULL) goto failed;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -4565,8 +4555,8 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
|
||||||
PyErr_SetString(PyExc_TypeError, "required field \"finalbody\" missing from Try");
|
PyErr_SetString(PyExc_TypeError, "required field \"finalbody\" missing from Try");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*out = Try(body, handlers, orelse, finalbody, lineno,
|
*out = Try(body, handlers, orelse, finalbody, lineno, col_offset,
|
||||||
col_offset, arena);
|
arena);
|
||||||
if (*out == NULL) goto failed;
|
if (*out == NULL) goto failed;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -4697,8 +4687,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
|
||||||
} else {
|
} else {
|
||||||
level = 0;
|
level = 0;
|
||||||
}
|
}
|
||||||
*out = ImportFrom(module, names, level, lineno, col_offset,
|
*out = ImportFrom(module, names, level, lineno, col_offset, arena);
|
||||||
arena);
|
|
||||||
if (*out == NULL) goto failed;
|
if (*out == NULL) goto failed;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -5344,8 +5333,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
|
||||||
PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from DictComp");
|
PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from DictComp");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*out = DictComp(key, value, generators, lineno, col_offset,
|
*out = DictComp(key, value, generators, lineno, col_offset, arena);
|
||||||
arena);
|
|
||||||
if (*out == NULL) goto failed;
|
if (*out == NULL) goto failed;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -5514,8 +5502,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
|
||||||
PyErr_SetString(PyExc_TypeError, "required field \"comparators\" missing from Compare");
|
PyErr_SetString(PyExc_TypeError, "required field \"comparators\" missing from Compare");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*out = Compare(left, ops, comparators, lineno, col_offset,
|
*out = Compare(left, ops, comparators, lineno, col_offset, arena);
|
||||||
arena);
|
|
||||||
if (*out == NULL) goto failed;
|
if (*out == NULL) goto failed;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -5614,8 +5601,8 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
|
||||||
} else {
|
} else {
|
||||||
kwargs = NULL;
|
kwargs = NULL;
|
||||||
}
|
}
|
||||||
*out = Call(func, args, keywords, starargs, kwargs, lineno,
|
*out = Call(func, args, keywords, starargs, kwargs, lineno, col_offset,
|
||||||
col_offset, arena);
|
arena);
|
||||||
if (*out == NULL) goto failed;
|
if (*out == NULL) goto failed;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -6575,8 +6562,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena)
|
||||||
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ExceptHandler");
|
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ExceptHandler");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*out = ExceptHandler(type, name, body, lineno, col_offset,
|
*out = ExceptHandler(type, name, body, lineno, col_offset, arena);
|
||||||
arena);
|
|
||||||
if (*out == NULL) goto failed;
|
if (*out == NULL) goto failed;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -6913,125 +6899,107 @@ PyInit__ast(void)
|
||||||
m = PyModule_Create(&_astmodule);
|
m = PyModule_Create(&_astmodule);
|
||||||
if (!m) return NULL;
|
if (!m) return NULL;
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return
|
if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return NULL;
|
||||||
NULL;
|
|
||||||
if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)
|
if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return
|
if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0)
|
if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type) <
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type)
|
|
||||||
< 0) return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Expression", (PyObject*)Expression_type) <
|
|
||||||
0) return NULL;
|
0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Expression", (PyObject*)Expression_type) < 0)
|
||||||
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "Suite", (PyObject*)Suite_type) < 0) return
|
if (PyDict_SetItemString(d, "Suite", (PyObject*)Suite_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "stmt", (PyObject*)stmt_type) < 0) return
|
if (PyDict_SetItemString(d, "stmt", (PyObject*)stmt_type) < 0) return NULL;
|
||||||
NULL;
|
if (PyDict_SetItemString(d, "FunctionDef", (PyObject*)FunctionDef_type) <
|
||||||
if (PyDict_SetItemString(d, "FunctionDef", (PyObject*)FunctionDef_type)
|
0) return NULL;
|
||||||
< 0) return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "ClassDef", (PyObject*)ClassDef_type) < 0)
|
if (PyDict_SetItemString(d, "ClassDef", (PyObject*)ClassDef_type) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "Return", (PyObject*)Return_type) < 0)
|
if (PyDict_SetItemString(d, "Return", (PyObject*)Return_type) < 0) return
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Delete", (PyObject*)Delete_type) < 0)
|
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Assign", (PyObject*)Assign_type) < 0)
|
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "AugAssign", (PyObject*)AugAssign_type) <
|
|
||||||
0) return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "For", (PyObject*)For_type) < 0) return
|
|
||||||
NULL;
|
NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Delete", (PyObject*)Delete_type) < 0) return
|
||||||
|
NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Assign", (PyObject*)Assign_type) < 0) return
|
||||||
|
NULL;
|
||||||
|
if (PyDict_SetItemString(d, "AugAssign", (PyObject*)AugAssign_type) < 0)
|
||||||
|
return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "For", (PyObject*)For_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "While", (PyObject*)While_type) < 0) return
|
if (PyDict_SetItemString(d, "While", (PyObject*)While_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "If", (PyObject*)If_type) < 0) return NULL;
|
if (PyDict_SetItemString(d, "If", (PyObject*)If_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "With", (PyObject*)With_type) < 0) return
|
if (PyDict_SetItemString(d, "With", (PyObject*)With_type) < 0) return NULL;
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Raise", (PyObject*)Raise_type) < 0) return
|
if (PyDict_SetItemString(d, "Raise", (PyObject*)Raise_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Try", (PyObject*)Try_type) < 0) return
|
if (PyDict_SetItemString(d, "Try", (PyObject*)Try_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Assert", (PyObject*)Assert_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Assert", (PyObject*)Assert_type) < 0)
|
if (PyDict_SetItemString(d, "Import", (PyObject*)Import_type) < 0) return
|
||||||
return NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Import", (PyObject*)Import_type) < 0)
|
if (PyDict_SetItemString(d, "ImportFrom", (PyObject*)ImportFrom_type) < 0)
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "ImportFrom", (PyObject*)ImportFrom_type) <
|
|
||||||
0) return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Global", (PyObject*)Global_type) < 0)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Global", (PyObject*)Global_type) < 0) return
|
||||||
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Nonlocal", (PyObject*)Nonlocal_type) < 0)
|
if (PyDict_SetItemString(d, "Nonlocal", (PyObject*)Nonlocal_type) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "Expr", (PyObject*)Expr_type) < 0) return
|
if (PyDict_SetItemString(d, "Expr", (PyObject*)Expr_type) < 0) return NULL;
|
||||||
NULL;
|
if (PyDict_SetItemString(d, "Pass", (PyObject*)Pass_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "Pass", (PyObject*)Pass_type) < 0) return
|
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Break", (PyObject*)Break_type) < 0) return
|
if (PyDict_SetItemString(d, "Break", (PyObject*)Break_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Continue", (PyObject*)Continue_type) < 0)
|
if (PyDict_SetItemString(d, "Continue", (PyObject*)Continue_type) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "expr", (PyObject*)expr_type) < 0) return
|
if (PyDict_SetItemString(d, "expr", (PyObject*)expr_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "BoolOp", (PyObject*)BoolOp_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "BoolOp", (PyObject*)BoolOp_type) < 0)
|
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "BinOp", (PyObject*)BinOp_type) < 0) return
|
if (PyDict_SetItemString(d, "BinOp", (PyObject*)BinOp_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "UnaryOp", (PyObject*)UnaryOp_type) < 0)
|
if (PyDict_SetItemString(d, "UnaryOp", (PyObject*)UnaryOp_type) < 0) return
|
||||||
return NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Lambda", (PyObject*)Lambda_type) < 0)
|
if (PyDict_SetItemString(d, "Lambda", (PyObject*)Lambda_type) < 0) return
|
||||||
return NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "IfExp", (PyObject*)IfExp_type) < 0) return
|
if (PyDict_SetItemString(d, "IfExp", (PyObject*)IfExp_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Dict", (PyObject*)Dict_type) < 0) return
|
if (PyDict_SetItemString(d, "Dict", (PyObject*)Dict_type) < 0) return NULL;
|
||||||
NULL;
|
if (PyDict_SetItemString(d, "Set", (PyObject*)Set_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "Set", (PyObject*)Set_type) < 0) return
|
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "ListComp", (PyObject*)ListComp_type) < 0)
|
if (PyDict_SetItemString(d, "ListComp", (PyObject*)ListComp_type) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "SetComp", (PyObject*)SetComp_type) < 0)
|
if (PyDict_SetItemString(d, "SetComp", (PyObject*)SetComp_type) < 0) return
|
||||||
return NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "DictComp", (PyObject*)DictComp_type) < 0)
|
if (PyDict_SetItemString(d, "DictComp", (PyObject*)DictComp_type) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "GeneratorExp",
|
if (PyDict_SetItemString(d, "GeneratorExp", (PyObject*)GeneratorExp_type) <
|
||||||
(PyObject*)GeneratorExp_type) < 0) return NULL;
|
0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "Yield", (PyObject*)Yield_type) < 0) return
|
if (PyDict_SetItemString(d, "Yield", (PyObject*)Yield_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "YieldFrom", (PyObject*)YieldFrom_type) <
|
if (PyDict_SetItemString(d, "YieldFrom", (PyObject*)YieldFrom_type) < 0)
|
||||||
0) return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Compare", (PyObject*)Compare_type) < 0)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "Call", (PyObject*)Call_type) < 0) return
|
if (PyDict_SetItemString(d, "Compare", (PyObject*)Compare_type) < 0) return
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Num", (PyObject*)Num_type) < 0) return
|
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Str", (PyObject*)Str_type) < 0) return
|
|
||||||
NULL;
|
NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Call", (PyObject*)Call_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Num", (PyObject*)Num_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Str", (PyObject*)Str_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "Bytes", (PyObject*)Bytes_type) < 0) return
|
if (PyDict_SetItemString(d, "Bytes", (PyObject*)Bytes_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Ellipsis", (PyObject*)Ellipsis_type) < 0)
|
if (PyDict_SetItemString(d, "Ellipsis", (PyObject*)Ellipsis_type) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "Attribute", (PyObject*)Attribute_type) <
|
if (PyDict_SetItemString(d, "Attribute", (PyObject*)Attribute_type) < 0)
|
||||||
0) return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Subscript", (PyObject*)Subscript_type) <
|
|
||||||
0) return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Starred", (PyObject*)Starred_type) < 0)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "Name", (PyObject*)Name_type) < 0) return
|
if (PyDict_SetItemString(d, "Subscript", (PyObject*)Subscript_type) < 0)
|
||||||
NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "List", (PyObject*)List_type) < 0) return
|
if (PyDict_SetItemString(d, "Starred", (PyObject*)Starred_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Name", (PyObject*)Name_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "List", (PyObject*)List_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "Tuple", (PyObject*)Tuple_type) < 0) return
|
if (PyDict_SetItemString(d, "Tuple", (PyObject*)Tuple_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "expr_context",
|
if (PyDict_SetItemString(d, "expr_context", (PyObject*)expr_context_type) <
|
||||||
(PyObject*)expr_context_type) < 0) return NULL;
|
0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "Load", (PyObject*)Load_type) < 0) return
|
if (PyDict_SetItemString(d, "Load", (PyObject*)Load_type) < 0) return NULL;
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Store", (PyObject*)Store_type) < 0) return
|
if (PyDict_SetItemString(d, "Store", (PyObject*)Store_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Del", (PyObject*)Del_type) < 0) return
|
if (PyDict_SetItemString(d, "Del", (PyObject*)Del_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "AugLoad", (PyObject*)AugLoad_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "AugLoad", (PyObject*)AugLoad_type) < 0)
|
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "AugStore", (PyObject*)AugStore_type) < 0)
|
if (PyDict_SetItemString(d, "AugStore", (PyObject*)AugStore_type) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "Param", (PyObject*)Param_type) < 0) return
|
if (PyDict_SetItemString(d, "Param", (PyObject*)Param_type) < 0) return
|
||||||
|
@ -7044,76 +7012,63 @@ PyInit__ast(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "Index", (PyObject*)Index_type) < 0) return
|
if (PyDict_SetItemString(d, "Index", (PyObject*)Index_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "boolop", (PyObject*)boolop_type) < 0)
|
if (PyDict_SetItemString(d, "boolop", (PyObject*)boolop_type) < 0) return
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "And", (PyObject*)And_type) < 0) return
|
|
||||||
NULL;
|
NULL;
|
||||||
|
if (PyDict_SetItemString(d, "And", (PyObject*)And_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "Or", (PyObject*)Or_type) < 0) return NULL;
|
if (PyDict_SetItemString(d, "Or", (PyObject*)Or_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "operator", (PyObject*)operator_type) < 0)
|
if (PyDict_SetItemString(d, "operator", (PyObject*)operator_type) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "Add", (PyObject*)Add_type) < 0) return
|
if (PyDict_SetItemString(d, "Add", (PyObject*)Add_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Sub", (PyObject*)Sub_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Mult", (PyObject*)Mult_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Div", (PyObject*)Div_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Mod", (PyObject*)Mod_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Pow", (PyObject*)Pow_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "LShift", (PyObject*)LShift_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Sub", (PyObject*)Sub_type) < 0) return
|
if (PyDict_SetItemString(d, "RShift", (PyObject*)RShift_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Mult", (PyObject*)Mult_type) < 0) return
|
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Div", (PyObject*)Div_type) < 0) return
|
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Mod", (PyObject*)Mod_type) < 0) return
|
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Pow", (PyObject*)Pow_type) < 0) return
|
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "LShift", (PyObject*)LShift_type) < 0)
|
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "RShift", (PyObject*)RShift_type) < 0)
|
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "BitOr", (PyObject*)BitOr_type) < 0) return
|
if (PyDict_SetItemString(d, "BitOr", (PyObject*)BitOr_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "BitXor", (PyObject*)BitXor_type) < 0)
|
if (PyDict_SetItemString(d, "BitXor", (PyObject*)BitXor_type) < 0) return
|
||||||
return NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "BitAnd", (PyObject*)BitAnd_type) < 0)
|
if (PyDict_SetItemString(d, "BitAnd", (PyObject*)BitAnd_type) < 0) return
|
||||||
return NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "FloorDiv", (PyObject*)FloorDiv_type) < 0)
|
if (PyDict_SetItemString(d, "FloorDiv", (PyObject*)FloorDiv_type) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyDict_SetItemString(d, "unaryop", (PyObject*)unaryop_type) < 0)
|
if (PyDict_SetItemString(d, "unaryop", (PyObject*)unaryop_type) < 0) return
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Invert", (PyObject*)Invert_type) < 0)
|
|
||||||
return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Not", (PyObject*)Not_type) < 0) return
|
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "UAdd", (PyObject*)UAdd_type) < 0) return
|
if (PyDict_SetItemString(d, "Invert", (PyObject*)Invert_type) < 0) return
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "USub", (PyObject*)USub_type) < 0) return
|
|
||||||
NULL;
|
NULL;
|
||||||
|
if (PyDict_SetItemString(d, "Not", (PyObject*)Not_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "UAdd", (PyObject*)UAdd_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "USub", (PyObject*)USub_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "cmpop", (PyObject*)cmpop_type) < 0) return
|
if (PyDict_SetItemString(d, "cmpop", (PyObject*)cmpop_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Eq", (PyObject*)Eq_type) < 0) return NULL;
|
if (PyDict_SetItemString(d, "Eq", (PyObject*)Eq_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "NotEq", (PyObject*)NotEq_type) < 0) return
|
if (PyDict_SetItemString(d, "NotEq", (PyObject*)NotEq_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "Lt", (PyObject*)Lt_type) < 0) return NULL;
|
if (PyDict_SetItemString(d, "Lt", (PyObject*)Lt_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "LtE", (PyObject*)LtE_type) < 0) return
|
if (PyDict_SetItemString(d, "LtE", (PyObject*)LtE_type) < 0) return NULL;
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Gt", (PyObject*)Gt_type) < 0) return NULL;
|
if (PyDict_SetItemString(d, "Gt", (PyObject*)Gt_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "GtE", (PyObject*)GtE_type) < 0) return
|
if (PyDict_SetItemString(d, "GtE", (PyObject*)GtE_type) < 0) return NULL;
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "Is", (PyObject*)Is_type) < 0) return NULL;
|
if (PyDict_SetItemString(d, "Is", (PyObject*)Is_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "IsNot", (PyObject*)IsNot_type) < 0) return
|
if (PyDict_SetItemString(d, "IsNot", (PyObject*)IsNot_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "In", (PyObject*)In_type) < 0) return NULL;
|
if (PyDict_SetItemString(d, "In", (PyObject*)In_type) < 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "NotIn", (PyObject*)NotIn_type) < 0) return
|
if (PyDict_SetItemString(d, "NotIn", (PyObject*)NotIn_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "comprehension",
|
if (PyDict_SetItemString(d, "comprehension", (PyObject*)comprehension_type)
|
||||||
(PyObject*)comprehension_type) < 0) return NULL;
|
< 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "excepthandler",
|
if (PyDict_SetItemString(d, "excepthandler", (PyObject*)excepthandler_type)
|
||||||
(PyObject*)excepthandler_type) < 0) return NULL;
|
< 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "ExceptHandler",
|
if (PyDict_SetItemString(d, "ExceptHandler", (PyObject*)ExceptHandler_type)
|
||||||
(PyObject*)ExceptHandler_type) < 0) return NULL;
|
< 0) return NULL;
|
||||||
if (PyDict_SetItemString(d, "arguments", (PyObject*)arguments_type) <
|
if (PyDict_SetItemString(d, "arguments", (PyObject*)arguments_type) < 0)
|
||||||
0) return NULL;
|
|
||||||
if (PyDict_SetItemString(d, "arg", (PyObject*)arg_type) < 0) return
|
|
||||||
NULL;
|
|
||||||
if (PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "arg", (PyObject*)arg_type) < 0) return NULL;
|
||||||
|
if (PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0) return
|
||||||
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "alias", (PyObject*)alias_type) < 0) return
|
if (PyDict_SetItemString(d, "alias", (PyObject*)alias_type) < 0) return
|
||||||
NULL;
|
NULL;
|
||||||
if (PyDict_SetItemString(d, "withitem", (PyObject*)withitem_type) < 0)
|
if (PyDict_SetItemString(d, "withitem", (PyObject*)withitem_type) < 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue