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)
40 | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)
60 | IfExp(expr test, expr body, expr orelse)
/third_party/python/Include/
DPython-ast.h144 asdl_seq *orelse; member
152 asdl_seq *orelse; member
159 asdl_seq *orelse; member
165 asdl_seq *orelse; member
188 asdl_seq *orelse; member
266 expr_ty orelse; member
504 orelse, string type_comment, int lineno, int col_offset, int
508 orelse, string type_comment, int lineno, int col_offset,
511 stmt_ty _Py_While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
515 stmt_ty _Py_If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
[all …]
/third_party/python/Lib/
Dast.py953 if node.orelse:
956 self.traverse(node.orelse)
1031 if node.orelse:
1034 self.traverse(node.orelse)
1042 while node.orelse and len(node.orelse) == 1 and isinstance(node.orelse[0], If):
1043 node = node.orelse[0]
1049 if node.orelse:
1052 self.traverse(node.orelse)
1059 if node.orelse:
1062 self.traverse(node.orelse)
[all …]
/third_party/python/Python/
DPython-ast.c202 PyObject *orelse; member
447 Py_CLEAR(state->orelse); in _PyAST_Fini()
531 if ((state->orelse = PyUnicode_InternFromString("orelse")) == NULL) return 0; in init_identifiers()
2192 For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * orelse, string in For() argument
2214 p->v.For.orelse = orelse; in For()
2224 AsyncFor(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * orelse, in AsyncFor() argument
2246 p->v.AsyncFor.orelse = orelse; in AsyncFor()
2256 While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, int in While() argument
2271 p->v.While.orelse = orelse; in While()
2280 If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, int in If() argument
[all …]
Dast.c241 validate_expr(exp->v.IfExp.orelse, Load); in validate_expr()
390 validate_stmts(stmt->v.For.orelse); in validate_stmt()
395 validate_stmts(stmt->v.AsyncFor.orelse); in validate_stmt()
399 validate_stmts(stmt->v.While.orelse); in validate_stmt()
403 validate_stmts(stmt->v.If.orelse); in validate_stmt()
443 asdl_seq_LEN(stmt->v.Try.orelse)) { in validate_stmt()
456 (!asdl_seq_LEN(stmt->v.Try.orelse) || in validate_stmt()
457 validate_stmts(stmt->v.Try.orelse)); in validate_stmt()
1926 expr_ty expression, body, orelse; in ast_for_ifexpr() local
1935 orelse = ast_for_expr(c, CHILD(n, 4)); in ast_for_ifexpr()
[all …]
Dast_opt.c490 CALL(astfold_expr, expr_ty, node_->v.IfExp.orelse); in astfold_expr()
668 CALL_SEQ(astfold_stmt, stmt_ty, node_->v.For.orelse); in astfold_stmt()
676 CALL_SEQ(astfold_stmt, stmt_ty, node_->v.AsyncFor.orelse); in astfold_stmt()
681 CALL_SEQ(astfold_stmt, stmt_ty, node_->v.While.orelse); in astfold_stmt()
686 CALL_SEQ(astfold_stmt, stmt_ty, node_->v.If.orelse); in astfold_stmt()
703 CALL_SEQ(astfold_stmt, stmt_ty, node_->v.Try.orelse); in astfold_stmt()
Dcompile.c1575 find_ann(st->v.For.orelse); in find_ann()
1579 find_ann(st->v.AsyncFor.orelse); in find_ann()
1583 find_ann(st->v.While.orelse); in find_ann()
1587 find_ann(st->v.If.orelse); in find_ann()
1605 find_ann(st->v.Try.orelse); in find_ann()
2565 if (!compiler_jump_if(c, e->v.IfExp.orelse, next, cond)) in compiler_jump_if()
2635 VISIT(c, expr, e->v.IfExp.orelse); in compiler_ifexp()
2715 if (s->v.If.orelse) { in compiler_if()
2716 VISIT_SEQ(c, stmt, s->v.If.orelse); in compiler_if()
2720 if (s->v.If.orelse) { in compiler_if()
[all …]
Dsymtable.c1278 if (s->v.For.orelse) in symtable_visit_stmt()
1279 VISIT_SEQ(st, stmt, s->v.For.orelse); in symtable_visit_stmt()
1284 if (s->v.While.orelse) in symtable_visit_stmt()
1285 VISIT_SEQ(st, stmt, s->v.While.orelse); in symtable_visit_stmt()
1291 if (s->v.If.orelse) in symtable_visit_stmt()
1292 VISIT_SEQ(st, stmt, s->v.If.orelse); in symtable_visit_stmt()
1304 VISIT_SEQ(st, stmt, s->v.Try.orelse); in symtable_visit_stmt()
1427 if (s->v.AsyncFor.orelse) in symtable_visit_stmt()
1428 VISIT_SEQ(st, stmt, s->v.AsyncFor.orelse); in symtable_visit_stmt()
1570 VISIT(st, expr, e->v.IfExp.orelse); in symtable_visit_expr()
Dast_unparse.c298 APPEND_EXPR(e->v.IfExp.orelse, PR_TEST); in append_ast_ifexp()
/third_party/python/Doc/library/
Dast.rst515 .. class:: IfExp(test, body, orelse)
527 orelse=Name(id='c', ctx=Load())))
984 .. class:: If(test, body, orelse)
987 node. ``body`` and ``orelse`` each hold a list of nodes.
990 appear as extra :class:`If` nodes within the ``orelse`` section of the
1010 orelse=[
1016 orelse=[
1022 .. class:: For(target, iter, body, orelse, type_comment)
1026 the item to be looped over, again as a single node. ``body`` and ``orelse``
1027 contain lists of nodes to execute. Those in ``orelse`` are executed if the
[all …]
/third_party/python/Lib/test/
Dtest_ast.py946 elif_stmt = node.body[0].orelse[0]
952 elif_stmt = node.body[0].orelse[0]
1692 self._check_content(s, if_stmt.orelse[0].test, 'other()')
/third_party/python/Tools/c-analyzer/
Dknown.tsv1300 Python/Python-ast.c - PyId_orelse variable _Py_IDENTIFIER(orelse)
/third_party/python/Doc/whatsnew/
D2.6.rst2717 ], orelse=[])