compiler_exit_scope
(&mut self)
| 1343 | |
| 1344 | // compiler_exit_scope |
| 1345 | fn exit_scope(&mut self) -> CodeObject { |
| 1346 | let _table = self.pop_symbol_table(); |
| 1347 | |
| 1348 | // Various scopes can have sub_tables: |
| 1349 | // - ast::TypeParams scope can have sub_tables (the function body's symbol table) |
| 1350 | // - Module scope can have sub_tables (for TypeAlias scopes, nested functions, classes) |
| 1351 | // - Function scope can have sub_tables (for nested functions, classes) |
| 1352 | // - Class scope can have sub_tables (for nested classes, methods) |
| 1353 | |
| 1354 | let pop = self.code_stack.pop(); |
| 1355 | let stack_top = compiler_unwrap_option(self, pop); |
| 1356 | // No parent scope stack to maintain |
| 1357 | unwrap_internal(self, stack_top.finalize_code(&self.opts)) |
| 1358 | } |
| 1359 | |
| 1360 | /// Exit annotation scope - similar to exit_scope but restores annotation_block to parent |
| 1361 | fn exit_annotation_scope(&mut self, saved_ctx: CompileContext) -> CodeObject { |
no test coverage detected