diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-12-27 19:33:54 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-12-27 19:34:16 +0100 |
commit | 0e6de2c31dbf8c21277481f112e99c52b913940f (patch) | |
tree | 91789032de3b8eec9d789acd1323f25fc5d08422 /node_modules/babel-traverse/lib/scope | |
parent | ceda0da31ad542c598c68146ae0712ca03df3d71 (diff) |
node_modules
Diffstat (limited to 'node_modules/babel-traverse/lib/scope')
-rw-r--r-- | node_modules/babel-traverse/lib/scope/lib/renamer.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/node_modules/babel-traverse/lib/scope/lib/renamer.js b/node_modules/babel-traverse/lib/scope/lib/renamer.js index a3b970515..351b4d932 100644 --- a/node_modules/babel-traverse/lib/scope/lib/renamer.js +++ b/node_modules/babel-traverse/lib/scope/lib/renamer.js @@ -80,33 +80,6 @@ var Renamer = function () { } }; - Renamer.prototype.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) { - return; - - if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return; - if (this.binding.kind !== "hoisted") return; - - path.node.id = t.identifier(this.oldName); - path.node._blockHoist = 3; - - path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(t.identifier(this.newName), t.toExpression(path.node))])); - }; - - Renamer.prototype.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) { - return; - - if (!path.isFunctionExpression() && !path.isClassExpression()) return; - if (this.binding.kind !== "local") return; - - path.node.id = t.identifier(this.oldName); - - this.binding.scope.parent.push({ - id: t.identifier(this.newName) - }); - - path.replaceWith(t.assignmentExpression("=", t.identifier(this.newName), path.node)); - }; - Renamer.prototype.rename = function rename(block) { var binding = this.binding, oldName = this.oldName, @@ -131,11 +104,6 @@ var Renamer = function () { } if (binding.type === "hoisted") {} - - if (parentDeclar) { - this.maybeConvertFromClassFunctionDeclaration(parentDeclar); - this.maybeConvertFromClassFunctionExpression(parentDeclar); - } }; return Renamer; |