Home
last modified time | relevance | path

Searched refs:orelse (Results 1 – 13 of 13) sorted by relevance

/third_party/python/Parser/
DPython.asdl31 -- use 'orelse' because else is a keyword in target languages
32 | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)
33 | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)
34 | While(expr test, stmt* body, stmt* orelse)
35 | If(expr test, stmt* body, stmt* orelse)
42 | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)
62 | IfExp(expr test, expr body, expr orelse)
/third_party/python/Include/internal/
Dpycore_ast.h245 asdl_stmt_seq *orelse; member
253 asdl_stmt_seq *orelse; member
260 asdl_stmt_seq *orelse; member
266 asdl_stmt_seq *orelse; member
294 asdl_stmt_seq *orelse; member
372 expr_ty orelse; member
663 asdl_stmt_seq * orelse, string type_comment, int lineno, int
667 asdl_stmt_seq * orelse, string type_comment, int
671 orelse, int lineno, int col_offset, int end_lineno, int
673 stmt_ty _PyAST_If(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse,
[all …]
Dpycore_ast_state.h222 PyObject *orelse; member
/third_party/python/Lib/
Dast.py959 if node.orelse:
962 self.traverse(node.orelse)
1037 if node.orelse:
1040 self.traverse(node.orelse)
1048 while node.orelse and len(node.orelse) == 1 and isinstance(node.orelse[0], If):
1049 node = node.orelse[0]
1055 if node.orelse:
1058 self.traverse(node.orelse)
1065 if node.orelse:
1068 self.traverse(node.orelse)
[all …]
/third_party/python/Python/
Dast.c257 validate_expr(state, exp->v.IfExp.orelse, Load); in validate_expr()
728 validate_stmts(state, stmt->v.For.orelse); in validate_stmt()
734 validate_stmts(state, stmt->v.AsyncFor.orelse); in validate_stmt()
739 validate_stmts(state, stmt->v.While.orelse); in validate_stmt()
744 validate_stmts(state, stmt->v.If.orelse); in validate_stmt()
804 asdl_seq_LEN(stmt->v.Try.orelse)) { in validate_stmt()
817 (!asdl_seq_LEN(stmt->v.Try.orelse) || in validate_stmt()
818 validate_stmts(state, stmt->v.Try.orelse)); in validate_stmt()
DPython-ast.c236 Py_CLEAR(state->orelse); in _PyAST_Fini()
335 if ((state->orelse = PyUnicode_InternFromString("orelse")) == NULL) return 0; in init_identifiers()
2165 orelse, string type_comment, int lineno, int col_offset, int in _PyAST_For() argument
2186 p->v.For.orelse = orelse; in _PyAST_For()
2197 asdl_stmt_seq * orelse, string type_comment, int lineno, int in _PyAST_AsyncFor() argument
2218 p->v.AsyncFor.orelse = orelse; in _PyAST_AsyncFor()
2228 _PyAST_While(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse, int in _PyAST_While() argument
2244 p->v.While.orelse = orelse; in _PyAST_While()
2253 _PyAST_If(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse, int in _PyAST_If() argument
2269 p->v.If.orelse = orelse; in _PyAST_If()
[all …]
Dast_opt.c517 CALL(astfold_expr, expr_ty, node_->v.IfExp.orelse); in astfold_expr()
708 CALL_SEQ(astfold_stmt, stmt, node_->v.For.orelse); in astfold_stmt()
716 CALL_SEQ(astfold_stmt, stmt, node_->v.AsyncFor.orelse); in astfold_stmt()
721 CALL_SEQ(astfold_stmt, stmt, node_->v.While.orelse); in astfold_stmt()
726 CALL_SEQ(astfold_stmt, stmt, node_->v.If.orelse); in astfold_stmt()
743 CALL_SEQ(astfold_stmt, stmt, node_->v.Try.orelse); in astfold_stmt()
Dsymtable.c1313 if (s->v.For.orelse) in symtable_visit_stmt()
1314 VISIT_SEQ(st, stmt, s->v.For.orelse); in symtable_visit_stmt()
1319 if (s->v.While.orelse) in symtable_visit_stmt()
1320 VISIT_SEQ(st, stmt, s->v.While.orelse); in symtable_visit_stmt()
1326 if (s->v.If.orelse) in symtable_visit_stmt()
1327 VISIT_SEQ(st, stmt, s->v.If.orelse); in symtable_visit_stmt()
1343 VISIT_SEQ(st, stmt, s->v.Try.orelse); in symtable_visit_stmt()
1473 if (s->v.AsyncFor.orelse) in symtable_visit_stmt()
1474 VISIT_SEQ(st, stmt, s->v.AsyncFor.orelse); in symtable_visit_stmt()
1626 VISIT(st, expr, e->v.IfExp.orelse); in symtable_visit_expr()
Dcompile.c1684 find_ann(st->v.For.orelse); in find_ann()
1688 find_ann(st->v.AsyncFor.orelse); in find_ann()
1692 find_ann(st->v.While.orelse); in find_ann()
1696 find_ann(st->v.If.orelse); in find_ann()
1714 find_ann(st->v.Try.orelse); in find_ann()
2687 if (!compiler_jump_if(c, e->v.IfExp.orelse, next, cond)) in compiler_jump_if()
2759 VISIT(c, expr, e->v.IfExp.orelse); in compiler_ifexp()
2836 if (asdl_seq_LEN(s->v.If.orelse)) { in compiler_if()
2849 if (asdl_seq_LEN(s->v.If.orelse)) { in compiler_if()
2852 VISIT_SEQ(c, stmt, s->v.If.orelse); in compiler_if()
[all …]
Dast_unparse.c303 APPEND_EXPR(e->v.IfExp.orelse, PR_TEST); in append_ast_ifexp()
/third_party/python/Doc/library/
Dast.rst521 .. class:: IfExp(test, body, orelse)
533 orelse=Name(id='c', ctx=Load())))
990 .. class:: If(test, body, orelse)
993 node. ``body`` and ``orelse`` each hold a list of nodes.
996 appear as extra :class:`If` nodes within the ``orelse`` section of the
1016 orelse=[
1022 orelse=[
1028 .. class:: For(target, iter, body, orelse, type_comment)
1032 the item to be looped over, again as a single node. ``body`` and ``orelse``
1033 contain lists of nodes to execute. Those in ``orelse`` are executed if the
[all …]
/third_party/python/Lib/test/
Dtest_ast.py967 elif_stmt = node.body[0].orelse[0]
973 elif_stmt = node.body[0].orelse[0]
1901 self._check_content(s, if_stmt.orelse[0].test, 'other()')
/third_party/python/Doc/whatsnew/
D2.6.rst2717 ], orelse=[])