Lines Matching defs:body
180 Py_CLEAR(state->body);
289 if ((state->body = PyUnicode_InternFromString("body")) == NULL) return 0;
378 "body",
382 "body",
385 "body",
401 "body",
409 "body",
418 "body",
446 "body",
453 "body",
459 "body",
464 "body",
469 "body",
474 "body",
486 "body",
492 "body",
544 "body",
548 "body",
659 "body",
714 "body",
1109 "mod = Module(stmt* body, type_ignore* type_ignores)\n"
1110 " | Interactive(stmt* body)\n"
1111 " | Expression(expr body)\n"
1117 "Module(stmt* body, type_ignore* type_ignores)");
1121 "Interactive(stmt* body)");
1125 "Expression(expr body)");
1133 "stmt = FunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment)\n"
1134 " | AsyncFunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment)\n"
1135 " | ClassDef(identifier name, expr* bases, keyword* keywords, stmt* body, expr* decorator_list)\n"
1141 " | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n"
1142 " | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n"
1143 " | While(expr test, stmt* body, stmt* orelse)\n"
1144 " | If(expr test, stmt* body, stmt* orelse)\n"
1145 " | With(withitem* items, stmt* body, string? type_comment)\n"
1146 " | AsyncWith(withitem* items, stmt* body, string? type_comment)\n"
1149 " | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n"
1150 " | TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n"
1169 "FunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment)");
1180 "AsyncFunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment)");
1190 "ClassDef(identifier name, expr* bases, keyword* keywords, stmt* body, expr* decorator_list)");
1220 "For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)");
1226 "AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)");
1233 "While(expr test, stmt* body, stmt* orelse)");
1236 "If(expr test, stmt* body, stmt* orelse)");
1240 "With(withitem* items, stmt* body, string? type_comment)");
1246 "AsyncWith(withitem* items, stmt* body, string? type_comment)");
1264 "Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)");
1268 "TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)");
1315 " | Lambda(arguments args, expr body)\n"
1316 " | IfExp(expr test, expr body, expr orelse)\n"
1363 "Lambda(arguments args, expr body)");
1367 "IfExp(expr test, expr body, expr orelse)");
1705 "excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)");
1718 "ExceptHandler(expr? type, identifier? name, stmt* body)");
1781 "match_case(pattern pattern, expr? guard, stmt* body)");
1898 _PyAST_Module(asdl_stmt_seq * body, asdl_type_ignore_seq * type_ignores,
1906 p->v.Module.body = body;
1912 _PyAST_Interactive(asdl_stmt_seq * body, PyArena *arena)
1919 p->v.Interactive.body = body;
1924 _PyAST_Expression(expr_ty body, PyArena *arena)
1927 if (!body) {
1929 "field 'body' is required for Expression");
1936 p->v.Expression.body = body;
1959 _PyAST_FunctionDef(identifier name, arguments_ty args, asdl_stmt_seq * body,
1981 p->v.FunctionDef.body = body;
1994 body, asdl_expr_seq * decorator_list, expr_ty returns,
2015 p->v.AsyncFunctionDef.body = body;
2028 keywords, asdl_stmt_seq * body, asdl_expr_seq * decorator_list,
2045 p->v.ClassDef.body = body;
2179 _PyAST_For(expr_ty target, expr_ty iter, asdl_stmt_seq * body, asdl_stmt_seq *
2200 p->v.For.body = body;
2211 _PyAST_AsyncFor(expr_ty target, expr_ty iter, asdl_stmt_seq * body,
2232 p->v.AsyncFor.body = body;
2243 _PyAST_While(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse, int
2258 p->v.While.body = body;
2268 _PyAST_If(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse, int
2283 p->v.If.body = body;
2293 _PyAST_With(asdl_withitem_seq * items, asdl_stmt_seq * body, string
2303 p->v.With.body = body;
2313 _PyAST_AsyncWith(asdl_withitem_seq * items, asdl_stmt_seq * body, string
2323 p->v.AsyncWith.body = body;
2374 _PyAST_Try(asdl_stmt_seq * body, asdl_excepthandler_seq * handlers,
2383 p->v.Try.body = body;
2395 _PyAST_TryStar(asdl_stmt_seq * body, asdl_excepthandler_seq * handlers,
2405 p->v.TryStar.body = body;
2694 _PyAST_Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset, int
2703 if (!body) {
2705 "field 'body' is required for Lambda");
2713 p->v.Lambda.body = body;
2722 _PyAST_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int
2731 if (!body) {
2733 "field 'body' is required for IfExp");
2746 p->v.IfExp.body = body;
3285 _PyAST_ExceptHandler(expr_ty type, identifier name, asdl_stmt_seq * body, int
3296 p->v.ExceptHandler.body = body;
3409 _PyAST_match_case(pattern_ty pattern, expr_ty guard, asdl_stmt_seq * body,
3423 p->body = body;
3625 value = ast2obj_list(state, (asdl_seq*)o->v.Module.body, ast2obj_stmt);
3627 if (PyObject_SetAttr(result, state->body, value) == -1)
3641 value = ast2obj_list(state, (asdl_seq*)o->v.Interactive.body,
3644 if (PyObject_SetAttr(result, state->body, value) == -1)
3652 value = ast2obj_expr(state, o->v.Expression.body);
3654 if (PyObject_SetAttr(result, state->body, value) == -1)
3712 value = ast2obj_list(state, (asdl_seq*)o->v.FunctionDef.body,
3715 if (PyObject_SetAttr(result, state->body, value) == -1)
3749 value = ast2obj_list(state, (asdl_seq*)o->v.AsyncFunctionDef.body,
3752 if (PyObject_SetAttr(result, state->body, value) == -1)
3794 value = ast2obj_list(state, (asdl_seq*)o->v.ClassDef.body,
3797 if (PyObject_SetAttr(result, state->body, value) == -1)
3908 value = ast2obj_list(state, (asdl_seq*)o->v.For.body, ast2obj_stmt);
3910 if (PyObject_SetAttr(result, state->body, value) == -1)
3938 value = ast2obj_list(state, (asdl_seq*)o->v.AsyncFor.body,
3941 if (PyObject_SetAttr(result, state->body, value) == -1)
3965 value = ast2obj_list(state, (asdl_seq*)o->v.While.body, ast2obj_stmt);
3967 if (PyObject_SetAttr(result, state->body, value) == -1)
3985 value = ast2obj_list(state, (asdl_seq*)o->v.If.body, ast2obj_stmt);
3987 if (PyObject_SetAttr(result, state->body, value) == -1)
4006 value = ast2obj_list(state, (asdl_seq*)o->v.With.body, ast2obj_stmt);
4008 if (PyObject_SetAttr(result, state->body, value) == -1)
4027 value = ast2obj_list(state, (asdl_seq*)o->v.AsyncWith.body,
4030 if (PyObject_SetAttr(result, state->body, value) == -1)
4074 value = ast2obj_list(state, (asdl_seq*)o->v.Try.body, ast2obj_stmt);
4076 if (PyObject_SetAttr(result, state->body, value) == -1)
4101 value = ast2obj_list(state, (asdl_seq*)o->v.TryStar.body, ast2obj_stmt);
4103 if (PyObject_SetAttr(result, state->body, value) == -1)
4338 value = ast2obj_expr(state, o->v.Lambda.body);
4340 if (PyObject_SetAttr(result, state->body, value) == -1)
4353 value = ast2obj_expr(state, o->v.IfExp.body);
4355 if (PyObject_SetAttr(result, state->body, value) == -1)
4931 value = ast2obj_list(state, (asdl_seq*)o->v.ExceptHandler.body,
4934 if (PyObject_SetAttr(result, state->body, value) == -1)
5259 value = ast2obj_list(state, (asdl_seq*)o->body, ast2obj_stmt);
5261 if (PyObject_SetAttr(result, state->body, value) == -1)
5491 asdl_stmt_seq* body;
5494 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
5498 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Module");
5506 PyErr_Format(PyExc_TypeError, "Module field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
5510 body = _Py_asdl_stmt_seq_new(len, arena);
5511 if (body == NULL) goto failed;
5524 PyErr_SetString(PyExc_RuntimeError, "Module field \"body\" changed size during iteration");
5527 asdl_seq_SET(body, i, val);
5568 *out = _PyAST_Module(body, type_ignores, arena);
5578 asdl_stmt_seq* body;
5580 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
5584 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Interactive");
5592 PyErr_Format(PyExc_TypeError, "Interactive field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
5596 body = _Py_asdl_stmt_seq_new(len, arena);
5597 if (body == NULL) goto failed;
5610 PyErr_SetString(PyExc_RuntimeError, "Interactive field \"body\" changed size during iteration");
5613 asdl_seq_SET(body, i, val);
5617 *out = _PyAST_Interactive(body, arena);
5627 expr_ty body;
5629 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
5633 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Expression");
5641 res = obj2ast_expr(state, tmp, &body, arena);
5646 *out = _PyAST_Expression(body, arena);
5817 asdl_stmt_seq* body;
5856 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
5860 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from FunctionDef");
5868 PyErr_Format(PyExc_TypeError, "FunctionDef field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
5872 body = _Py_asdl_stmt_seq_new(len, arena);
5873 if (body == NULL) goto failed;
5886 PyErr_SetString(PyExc_RuntimeError, "FunctionDef field \"body\" changed size during iteration");
5889 asdl_seq_SET(body, i, val);
5964 *out = _PyAST_FunctionDef(name, args, body, decorator_list, returns,
5978 asdl_stmt_seq* body;
6017 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
6021 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from AsyncFunctionDef");
6029 PyErr_Format(PyExc_TypeError, "AsyncFunctionDef field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
6033 body = _Py_asdl_stmt_seq_new(len, arena);
6034 if (body == NULL) goto failed;
6047 PyErr_SetString(PyExc_RuntimeError, "AsyncFunctionDef field \"body\" changed size during iteration");
6050 asdl_seq_SET(body, i, val);
6125 *out = _PyAST_AsyncFunctionDef(name, args, body, decorator_list,
6141 asdl_stmt_seq* body;
6235 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
6239 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ClassDef");
6247 PyErr_Format(PyExc_TypeError, "ClassDef field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
6251 body = _Py_asdl_stmt_seq_new(len, arena);
6252 if (body == NULL) goto failed;
6265 PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"body\" changed size during iteration");
6268 asdl_seq_SET(body, i, val);
6309 *out = _PyAST_ClassDef(name, bases, keywords, body, decorator_list,
6639 asdl_stmt_seq* body;
6677 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
6681 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from For");
6689 PyErr_Format(PyExc_TypeError, "For field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
6693 body = _Py_asdl_stmt_seq_new(len, arena);
6694 if (body == NULL) goto failed;
6707 PyErr_SetString(PyExc_RuntimeError, "For field \"body\" changed size during iteration");
6710 asdl_seq_SET(body, i, val);
6768 *out = _PyAST_For(target, iter, body, orelse, type_comment, lineno,
6781 asdl_stmt_seq* body;
6819 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
6823 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from AsyncFor");
6831 PyErr_Format(PyExc_TypeError, "AsyncFor field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
6835 body = _Py_asdl_stmt_seq_new(len, arena);
6836 if (body == NULL) goto failed;
6849 PyErr_SetString(PyExc_RuntimeError, "AsyncFor field \"body\" changed size during iteration");
6852 asdl_seq_SET(body, i, val);
6910 *out = _PyAST_AsyncFor(target, iter, body, orelse, type_comment,
6923 asdl_stmt_seq* body;
6943 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
6947 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from While");
6955 PyErr_Format(PyExc_TypeError, "While field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
6959 body = _Py_asdl_stmt_seq_new(len, arena);
6960 if (body == NULL) goto failed;
6973 PyErr_SetString(PyExc_RuntimeError, "While field \"body\" changed size during iteration");
6976 asdl_seq_SET(body, i, val);
7017 *out = _PyAST_While(test, body, orelse, lineno, col_offset, end_lineno,
7029 asdl_stmt_seq* body;
7049 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
7053 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from If");
7061 PyErr_Format(PyExc_TypeError, "If field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
7065 body = _Py_asdl_stmt_seq_new(len, arena);
7066 if (body == NULL) goto failed;
7079 PyErr_SetString(PyExc_RuntimeError, "If field \"body\" changed size during iteration");
7082 asdl_seq_SET(body, i, val);
7123 *out = _PyAST_If(test, body, orelse, lineno, col_offset, end_lineno,
7135 asdl_stmt_seq* body;
7175 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
7179 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from With");
7187 PyErr_Format(PyExc_TypeError, "With field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
7191 body = _Py_asdl_stmt_seq_new(len, arena);
7192 if (body == NULL) goto failed;
7205 PyErr_SetString(PyExc_RuntimeError, "With field \"body\" changed size during iteration");
7208 asdl_seq_SET(body, i, val);
7229 *out = _PyAST_With(items, body, type_comment, lineno, col_offset,
7241 asdl_stmt_seq* body;
7281 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
7285 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from AsyncWith");
7293 PyErr_Format(PyExc_TypeError, "AsyncWith field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
7297 body = _Py_asdl_stmt_seq_new(len, arena);
7298 if (body == NULL) goto failed;
7311 PyErr_SetString(PyExc_RuntimeError, "AsyncWith field \"body\" changed size during iteration");
7314 asdl_seq_SET(body, i, val);
7335 *out = _PyAST_AsyncWith(items, body, type_comment, lineno, col_offset,
7462 asdl_stmt_seq* body;
7467 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
7471 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Try");
7479 PyErr_Format(PyExc_TypeError, "Try field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
7483 body = _Py_asdl_stmt_seq_new(len, arena);
7484 if (body == NULL) goto failed;
7497 PyErr_SetString(PyExc_RuntimeError, "Try field \"body\" changed size during iteration");
7500 asdl_seq_SET(body, i, val);
7615 *out = _PyAST_Try(body, handlers, orelse, finalbody, lineno,
7626 asdl_stmt_seq* body;
7631 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
7635 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from TryStar");
7643 PyErr_Format(PyExc_TypeError, "TryStar field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
7647 body = _Py_asdl_stmt_seq_new(len, arena);
7648 if (body == NULL) goto failed;
7661 PyErr_SetString(PyExc_RuntimeError, "TryStar field \"body\" changed size during iteration");
7664 asdl_seq_SET(body, i, val);
7779 *out = _PyAST_TryStar(body, handlers, orelse, finalbody, lineno,
8463 expr_ty body;
8482 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
8486 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Lambda");
8494 res = obj2ast_expr(state, tmp, &body, arena);
8499 *out = _PyAST_Lambda(args, body, lineno, col_offset, end_lineno,
8511 expr_ty body;
8531 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
8535 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from IfExp");
8543 res = obj2ast_expr(state, tmp, &body, arena);
8565 *out = _PyAST_IfExp(test, body, orelse, lineno, col_offset, end_lineno,
10411 asdl_stmt_seq* body;
10447 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
10451 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ExceptHandler");
10459 PyErr_Format(PyExc_TypeError, "ExceptHandler field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
10463 body = _Py_asdl_stmt_seq_new(len, arena);
10464 if (body == NULL) goto failed;
10477 PyErr_SetString(PyExc_RuntimeError, "ExceptHandler field \"body\" changed size during iteration");
10480 asdl_seq_SET(body, i, val);
10484 *out = _PyAST_ExceptHandler(type, name, body, lineno, col_offset,
11175 asdl_stmt_seq* body;
11211 if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) {
11215 PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from match_case");
11223 PyErr_Format(PyExc_TypeError, "match_case field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp)));
11227 body = _Py_asdl_stmt_seq_new(len, arena);
11228 if (body == NULL) goto failed;
11241 PyErr_SetString(PyExc_RuntimeError, "match_case field \"body\" changed size during iteration");
11244 asdl_seq_SET(body, i, val);
11248 *out = _PyAST_match_case(pattern, guard, body, arena);