* Processes the provided has thi. * @param {boolean} hasThis true, when this is defined * @param {Identifier[]} params scope params * @param {() => void} fn inner function * @returns {void}
(hasThis, params, fn)
| 4611 | * @returns {void} |
| 4612 | */ |
| 4613 | inClassScope(hasThis, params, fn) { |
| 4614 | const oldScope = this.scope; |
| 4615 | this.scope = { |
| 4616 | topLevelScope: oldScope.topLevelScope, |
| 4617 | inTry: false, |
| 4618 | inShorthand: false, |
| 4619 | inTaggedTemplateTag: false, |
| 4620 | isStrict: oldScope.isStrict, |
| 4621 | isAsmJs: oldScope.isAsmJs, |
| 4622 | terminated: undefined, |
| 4623 | definitions: oldScope.definitions.createChild() |
| 4624 | }; |
| 4625 | |
| 4626 | if (hasThis) { |
| 4627 | this.undefineVariable("this"); |
| 4628 | } |
| 4629 | |
| 4630 | this.enterPatterns(params, this._defineVariable); |
| 4631 | |
| 4632 | fn(); |
| 4633 | |
| 4634 | this.scope = oldScope; |
| 4635 | } |
| 4636 | |
| 4637 | /** |
| 4638 | * Processes the provided has thi. |
no test coverage detected