split up function declarations from their exports - fixes #609

This commit is contained in:
Sebastian McKenzie
2015-01-28 18:34:43 +11:00
parent 244aed1ae9
commit bc6b31efbc
2 changed files with 9 additions and 0 deletions

View File

@@ -16,6 +16,10 @@ exports.ExportDeclaration = function (node, parent, scope) {
]);
node.declaration = temp;
return [declar, node];
} else if (t.isFunctionDeclaration(declar)) {
node._blockHoist = 2;
node.declaration = declar.id;
return [declar, node];
}
} else {
if (t.isFunctionDeclaration(declar)) {