| 1413 | return targets |
| 1414 | |
| 1415 | def patch_continue(self, tokens, offset, op): |
| 1416 | if op in (self.opc.JUMP_FORWARD, self.opc.JUMP_ABSOLUTE): |
| 1417 | # FIXME: this is a hack to catch stuff like: |
| 1418 | # for ... |
| 1419 | # try: ... |
| 1420 | # except: continue |
| 1421 | # the "continue" is not on a new line. |
| 1422 | n = len(tokens) |
| 1423 | if ( |
| 1424 | n > 2 |
| 1425 | and tokens[-1].kind == "JUMP_BACK" |
| 1426 | and self.code[offset + 3] == self.opc.END_FINALLY |
| 1427 | ): |
| 1428 | tokens[-1].kind = intern("CONTINUE") |
| 1429 | |
| 1430 | # FIXME: combine with scanner3.py code and put into scanner.py |
| 1431 | def rem_or(self, start, end, instr, target=None, include_beyond_target=False): |