* Processes the provided fn. * @param {() => void} fn inner function * @param {boolean} inExecutedPath executed state * @returns {void}
(fn, inExecutedPath = false)
| 4672 | * @returns {void} |
| 4673 | */ |
| 4674 | inBlockScope(fn, inExecutedPath = false) { |
| 4675 | const oldScope = this.scope; |
| 4676 | this.scope = { |
| 4677 | topLevelScope: oldScope.topLevelScope, |
| 4678 | inTry: oldScope.inTry, |
| 4679 | inShorthand: false, |
| 4680 | inTaggedTemplateTag: false, |
| 4681 | isStrict: oldScope.isStrict, |
| 4682 | isAsmJs: oldScope.isAsmJs, |
| 4683 | terminated: oldScope.terminated, |
| 4684 | definitions: oldScope.definitions.createChild() |
| 4685 | }; |
| 4686 | |
| 4687 | fn(); |
| 4688 | |
| 4689 | const terminated = this.scope.terminated; |
| 4690 | |
| 4691 | if (inExecutedPath && terminated) { |
| 4692 | oldScope.terminated = terminated; |
| 4693 | } |
| 4694 | |
| 4695 | this.scope = oldScope; |
| 4696 | } |
| 4697 | |
| 4698 | /** |
| 4699 | * Processes the provided statement. |
no test coverage detected