move shadow function visitors to entrance instead of exit

This commit is contained in:
Sebastian McKenzie
2015-05-08 23:33:20 +01:00
parent f0bfdfb699
commit 920c84a1f2
2 changed files with 15 additions and 19 deletions

View File

@@ -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 };