Home
last modified time | relevance | path

Searched refs:FunctionDef (Results 1 – 12 of 12) sorted by relevance

/third_party/python/Parser/
Daction_helpers.c770 function_def->v.FunctionDef.name, function_def->v.FunctionDef.args, in _PyPegen_function_def_decorators()
771 function_def->v.FunctionDef.body, decorators, function_def->v.FunctionDef.returns, in _PyPegen_function_def_decorators()
772 function_def->v.FunctionDef.type_comment, function_def->lineno, in _PyPegen_function_def_decorators()
778 function_def->v.FunctionDef.name, function_def->v.FunctionDef.args, in _PyPegen_function_def_decorators()
779 function_def->v.FunctionDef.body, decorators, in _PyPegen_function_def_decorators()
780 function_def->v.FunctionDef.returns, in _PyPegen_function_def_decorators()
781 function_def->v.FunctionDef.type_comment, function_def->lineno, in _PyPegen_function_def_decorators()
DPython.asdl11 stmt = FunctionDef(identifier name, arguments args,
/third_party/python/Python/
Dsymtable.c1198 if (!symtable_add_def(st, s->v.FunctionDef.name, DEF_LOCAL, LOCATION(s))) in symtable_visit_stmt()
1200 if (s->v.FunctionDef.args->defaults) in symtable_visit_stmt()
1201 VISIT_SEQ(st, expr, s->v.FunctionDef.args->defaults); in symtable_visit_stmt()
1202 if (s->v.FunctionDef.args->kw_defaults) in symtable_visit_stmt()
1203 VISIT_SEQ_WITH_NULL(st, expr, s->v.FunctionDef.args->kw_defaults); in symtable_visit_stmt()
1204 if (!symtable_visit_annotations(st, s, s->v.FunctionDef.args, in symtable_visit_stmt()
1205 s->v.FunctionDef.returns)) in symtable_visit_stmt()
1207 if (s->v.FunctionDef.decorator_list) in symtable_visit_stmt()
1208 VISIT_SEQ(st, expr, s->v.FunctionDef.decorator_list); in symtable_visit_stmt()
1209 if (!symtable_enter_block(st, s->v.FunctionDef.name, in symtable_visit_stmt()
[all …]
Dast.c728 ret = validate_body(state, stmt->v.FunctionDef.body, "FunctionDef") && in validate_stmt()
729 validate_arguments(state, stmt->v.FunctionDef.args) && in validate_stmt()
730 validate_exprs(state, stmt->v.FunctionDef.decorator_list, Load, 0) && in validate_stmt()
731 (!stmt->v.FunctionDef.returns || in validate_stmt()
732 validate_expr(state, stmt->v.FunctionDef.returns, Load)); in validate_stmt()
Dast_opt.c877 CALL(astfold_arguments, arguments_ty, node_->v.FunctionDef.args); in astfold_stmt()
878 CALL(astfold_body, asdl_seq, node_->v.FunctionDef.body); in astfold_stmt()
879 CALL_SEQ(astfold_expr, expr, node_->v.FunctionDef.decorator_list); in astfold_stmt()
881 CALL_OPT(astfold_expr, expr_ty, node_->v.FunctionDef.returns); in astfold_stmt()
DPython-ast.c1979 p->v.FunctionDef.name = name; in _PyAST_FunctionDef()
1980 p->v.FunctionDef.args = args; in _PyAST_FunctionDef()
1981 p->v.FunctionDef.body = body; in _PyAST_FunctionDef()
1982 p->v.FunctionDef.decorator_list = decorator_list; in _PyAST_FunctionDef()
1983 p->v.FunctionDef.returns = returns; in _PyAST_FunctionDef()
1984 p->v.FunctionDef.type_comment = type_comment; in _PyAST_FunctionDef()
3702 value = ast2obj_identifier(state, o->v.FunctionDef.name); in ast2obj_stmt()
3707 value = ast2obj_arguments(state, o->v.FunctionDef.args); in ast2obj_stmt()
3712 value = ast2obj_list(state, (asdl_seq*)o->v.FunctionDef.body, in ast2obj_stmt()
3718 value = ast2obj_list(state, (asdl_seq*)o->v.FunctionDef.decorator_list, in ast2obj_stmt()
[all …]
Dcompile.c2616 args = s->v.FunctionDef.args; in compiler_function()
2617 returns = s->v.FunctionDef.returns; in compiler_function()
2618 decos = s->v.FunctionDef.decorator_list; in compiler_function()
2619 name = s->v.FunctionDef.name; in compiler_function()
2620 body = s->v.FunctionDef.body; in compiler_function()
/third_party/python/Doc/library/
Dast.rst1650 .. class:: FunctionDef(name, args, body, decorator_list, returns, type_comment)
1669 expression. Unlike :class:`FunctionDef`, ``body`` holds a single node.
1724 FunctionDef(
1832 * ``decorator_list`` is a list of nodes, as in :class:`FunctionDef`.
1866 :class:`FunctionDef`.
2030 :class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`,
/third_party/python/Lib/test/
Dtest_ast.py1339 f = ast.FunctionDef("x", a, [], [], None)
1341 f = ast.FunctionDef("x", a, [ast.Pass()], [ast.Name("x", ast.Store())],
1344 f = ast.FunctionDef("x", a, [ast.Pass()], [],
1348 return ast.FunctionDef("x", args, [ast.Pass()], [], None)
/third_party/python/Lib/
Dast.py290 if not isinstance(node, (AsyncFunctionDef, FunctionDef, ClassDef, Module)):
789 node, (AsyncFunctionDef, FunctionDef, ClassDef, Module)
/third_party/python/Include/internal/
Dpycore_ast.h195 } FunctionDef; member
/third_party/python/Misc/
DNEWS18954 removed from Module, ClassDef, FunctionDef, and AsyncFunctionDef ast nodes
21594 removed from Module, ClassDef, FunctionDef, and AsyncFunctionDef ast nodes
24174 - bpo-29463: Add ``docstring`` field to Module, ClassDef, FunctionDef, and