aboutsummaryrefslogtreecommitdiff
path: root/node_modules/babel-traverse/lib/scope
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/babel-traverse/lib/scope')
-rw-r--r--node_modules/babel-traverse/lib/scope/lib/renamer.js32
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;