diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-08-30 17:21:18 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-08-30 17:21:18 +0800 |
| commit | efbc2ffe6a1ee5ec38a4396305561d6515d0943e (patch) | |
| tree | 2b4c94f18f2c792dfda813050755d5c0273fae22 /node_modules/@babel/traverse/lib/path/removal.js | |
| parent | 43acceb75957c880a5ba5a31aae221394a36d5f6 (diff) | |
node fixes, updates
Diffstat (limited to 'node_modules/@babel/traverse/lib/path/removal.js')
| -rw-r--r-- | node_modules/@babel/traverse/lib/path/removal.js | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/node_modules/@babel/traverse/lib/path/removal.js b/node_modules/@babel/traverse/lib/path/removal.js index aa61f9a6..04b9b701 100644 --- a/node_modules/@babel/traverse/lib/path/removal.js +++ b/node_modules/@babel/traverse/lib/path/removal.js @@ -11,25 +11,28 @@ exports._removeFromScope = _removeFromScope; exports.remove = remove; var _removalHooks = require("./lib/removal-hooks.js"); var _cache = require("../cache.js"); +var _replacement = require("./replacement.js"); var _index = require("./index.js"); var _t = require("@babel/types"); +var _modification = require("./modification.js"); +var _context = require("./context.js"); const { getBindingIdentifiers } = _t; function remove() { var _this$opts; - this._assertUnremoved(); - this.resync(); - if (!((_this$opts = this.opts) != null && _this$opts.noScope)) { - this._removeFromScope(); - } - if (this._callRemovalHooks()) { - this._markRemoved(); + _assertUnremoved.call(this); + _context.resync.call(this); + if (_callRemovalHooks.call(this)) { + _markRemoved.call(this); return; } + if (!((_this$opts = this.opts) != null && _this$opts.noScope)) { + _removeFromScope.call(this); + } this.shareCommentsWithSiblings(); - this._remove(); - this._markRemoved(); + _remove.call(this); + _markRemoved.call(this); } function _removeFromScope() { const bindings = getBindingIdentifiers(this.node, false, false, true); @@ -45,9 +48,9 @@ function _callRemovalHooks() { function _remove() { if (Array.isArray(this.container)) { this.container.splice(this.key, 1); - this.updateSiblingKeys(this.key, -1); + _modification.updateSiblingKeys.call(this, this.key, -1); } else { - this._replaceWith(null); + _replacement._replaceWith.call(this, null); } } function _markRemoved() { |
