| 25 | |
| 26 | |
| 27 | class Python38Parser(Python37Parser): |
| 28 | def p_38_stmt(self, args): |
| 29 | """ |
| 30 | stmt ::= async_for_stmt38 |
| 31 | stmt ::= async_forelse_stmt38 |
| 32 | stmt ::= call_stmt |
| 33 | stmt ::= continue |
| 34 | stmt ::= for38 |
| 35 | stmt ::= forelselaststmt38 |
| 36 | stmt ::= forelselaststmtl38 |
| 37 | stmt ::= forelsestmt38 |
| 38 | stmt ::= try_elsestmtl38 |
| 39 | stmt ::= try_except38 |
| 40 | stmt ::= try_except38r |
| 41 | stmt ::= try_except38r2 |
| 42 | stmt ::= try_except38r3 |
| 43 | stmt ::= try_except38r4 |
| 44 | stmt ::= try_except_as |
| 45 | stmt ::= try_except_ret38 |
| 46 | stmt ::= tryfinally38astmt |
| 47 | stmt ::= tryfinally38rstmt |
| 48 | stmt ::= tryfinally38rstmt2 |
| 49 | stmt ::= tryfinally38rstmt3 |
| 50 | stmt ::= tryfinally38stmt |
| 51 | stmt ::= whileTruestmt38 |
| 52 | stmt ::= whilestmt38 |
| 53 | |
| 54 | call_stmt ::= call |
| 55 | break ::= POP_BLOCK BREAK_LOOP |
| 56 | break ::= POP_BLOCK POP_TOP BREAK_LOOP |
| 57 | break ::= POP_TOP BREAK_LOOP |
| 58 | break ::= POP_EXCEPT BREAK_LOOP |
| 59 | |
| 60 | # The "continue" rule is a weird one. In 3.8, CONTINUE_LOOP was removed. |
| 61 | # Inside an loop we can have this, which can only appear in side a try/except |
| 62 | # And it can also appear at the end of the try except. |
| 63 | continue ::= POP_EXCEPT JUMP_BACK |
| 64 | |
| 65 | |
| 66 | # FIXME: this should be restricted to being inside a try block |
| 67 | stmt ::= except_ret38 |
| 68 | stmt ::= except_ret38a |
| 69 | |
| 70 | # FIXME: this should be added only when seeing GET_AITER or YIELD_FROM |
| 71 | async_for ::= GET_AITER _come_froms |
| 72 | SETUP_FINALLY GET_ANEXT LOAD_CONST YIELD_FROM POP_BLOCK |
| 73 | async_for_stmt38 ::= expr async_for |
| 74 | store for_block |
| 75 | COME_FROM_FINALLY |
| 76 | END_ASYNC_FOR |
| 77 | |
| 78 | genexpr_func_async ::= LOAD_ARG func_async_prefix |
| 79 | store comp_iter |
| 80 | JUMP_BACK COME_FROM_FINALLY |
| 81 | END_ASYNC_FOR |
| 82 | |
| 83 | # FIXME: "come_froms" after the "else_suite" or END_ASYNC_FOR distinguish which of |
| 84 | # for / forelse is used. Add "come_froms" and check of add up control-flow detection phase. |
no outgoing calls
no test coverage detected