move shadow function visitors to entrance instead of exit
This commit is contained in:
@@ -89,21 +89,17 @@ export var metadata = {
|
||||
group: "builtin-trailing"
|
||||
};
|
||||
|
||||
export var Program = {
|
||||
exit(node, parent, scope) {
|
||||
aliasFunction(function () {
|
||||
return node.body;
|
||||
}, this, scope);
|
||||
}
|
||||
};
|
||||
export function Program(node, parent, scope) {
|
||||
aliasFunction(function () {
|
||||
return node.body;
|
||||
}, this, scope);
|
||||
}
|
||||
|
||||
export var FunctionDeclaration = {
|
||||
exit(node, parent, scope) {
|
||||
aliasFunction(function () {
|
||||
t.ensureBlock(node);
|
||||
return node.body.body;
|
||||
}, this, scope);
|
||||
}
|
||||
};
|
||||
export function FunctionDeclaration(node, parent, scope) {
|
||||
aliasFunction(function () {
|
||||
t.ensureBlock(node);
|
||||
return node.body.body;
|
||||
}, this, scope);
|
||||
}
|
||||
|
||||
export { FunctionDeclaration as FunctionExpression };
|
||||
|
||||
Reference in New Issue
Block a user