Returns (reachable?, closing '}', stack).
(
self,
stmt: BlockStmt,
uop: CodeSection,
storage: Storage,
inst: Instruction | None,
emit_braces: bool = True,
)
| 675 | raise analysis_error(ex.args[0], rbrace) from None |
| 676 | |
| 677 | def emit_BlockStmt( |
| 678 | self, |
| 679 | stmt: BlockStmt, |
| 680 | uop: CodeSection, |
| 681 | storage: Storage, |
| 682 | inst: Instruction | None, |
| 683 | emit_braces: bool = True, |
| 684 | ) -> tuple[bool, Token | None, Storage]: |
| 685 | """ Returns (reachable?, closing '}', stack).""" |
| 686 | tkn: Token | None = None |
| 687 | try: |
| 688 | if emit_braces: |
| 689 | self.out.emit(stmt.open) |
| 690 | reachable = True |
| 691 | for s in stmt.body: |
| 692 | reachable, tkn, storage = self._emit_stmt(s, uop, storage, inst) |
| 693 | if tkn is not None: |
| 694 | self.out.emit(tkn) |
| 695 | if not reachable: |
| 696 | break |
| 697 | return reachable, stmt.close, storage |
| 698 | except StackError as ex: |
| 699 | if tkn is None: |
| 700 | tkn = stmt.close |
| 701 | raise analysis_error(ex.args[0], tkn) from None |
| 702 | |
| 703 | def emit_ForStmt( |
| 704 | self, |
no test coverage detected