Don't require a semicolon after 'export default [function|class] ...'

Issue #225
This commit is contained in:
Marijn Haverbeke
2015-03-20 22:40:51 +01:00
parent 1fc1d32e1f
commit 44c0231c09
2 changed files with 33 additions and 4 deletions

View File

@@ -15596,3 +15596,32 @@ test("new.target", {
}, {ecmaVersion: 6});
testFail("new.prop", "The only valid meta property for new is new.target (1:4)", {ecmaVersion: 6});
test("export default function () {} false", {
body: [
{
declaration: {
id: null,
generator: false,
expression: false,
params: [],
body: {
body: [],
type: "BlockStatement"
},
type: "FunctionExpression"
},
type: "ExportDefaultDeclaration"
},
{
expression: {
value: false,
raw: "false",
type: "Literal"
},
type: "ExpressionStatement"
}
],
sourceType: "module",
type: "Program"
}, {ecmaVersion: 6, sourceType: "module"})