Merge branch 'export-default-declarations' of https://github.com/sebmck/acorn

This commit is contained in:
Sebastian McKenzie 2014-12-27 19:55:15 +11:00
commit 29a33f5ae9

View File

@ -3147,7 +3147,11 @@
} else
// export default ...;
if (eat(_default)) {
node.declaration = parseExpression(true);
if (tokType === _function || tokType === _class) {
node.declaration = parseStatement();
} else {
node.declaration = parseExpression(true);
}
node['default'] = true;
node.specifiers = null;
node.source = null;