Merge pull request babel/babel-eslint#170 from hzoo/remove-super-transform
remove super transform since it should be in espree
This commit is contained in:
parent
d06c003344
commit
2140a08e3e
@ -223,30 +223,24 @@ var astTransformVisitor = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// classes
|
// remove class property keys (or patch in escope)
|
||||||
|
|
||||||
if (this.isReferencedIdentifier({ name: "super" })) {
|
|
||||||
return t.inherits(t.thisExpression(), node);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isClassProperty()) {
|
if (this.isClassProperty()) {
|
||||||
delete node.key;
|
delete node.key;
|
||||||
}
|
}
|
||||||
|
|
||||||
// functions
|
// async function as generator
|
||||||
|
|
||||||
if (this.isFunction()) {
|
if (this.isFunction()) {
|
||||||
if (node.async) node.generator = true;
|
if (node.async) node.generator = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// await transform to yield
|
||||||
if (this.isAwaitExpression()) {
|
if (this.isAwaitExpression()) {
|
||||||
node.type = "YieldExpression";
|
node.type = "YieldExpression";
|
||||||
node.delegate = node.all;
|
node.delegate = node.all;
|
||||||
delete node.all;
|
delete node.all;
|
||||||
}
|
}
|
||||||
|
|
||||||
// template strings
|
// template string range fixes
|
||||||
|
|
||||||
if (this.isTemplateLiteral()) {
|
if (this.isTemplateLiteral()) {
|
||||||
node.quasis.forEach(function (q) {
|
node.quasis.forEach(function (q) {
|
||||||
q.range[0] -= 1;
|
q.range[0] -= 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user