Fixed import declaration for default+batch case.

Also removed deprecated `kind` property.
Fixes #161.
This commit is contained in:
Ingvar Stepanyan
2014-11-15 10:26:05 +02:00
committed by Marijn Haverbeke
parent f48a921e24
commit 4496ca411a
2 changed files with 41 additions and 13 deletions

View File

@@ -14160,3 +14160,34 @@ test("(for (x of array) for (y of array2) if (x === test) x)", {
}
}]
}, {ecmaVersion: 7, preserveParens: true});
// https://github.com/marijnh/acorn/issues/161
test("import foo, * as bar from 'baz';", {
type: "Program",
body: [{
type: "ImportDeclaration",
specifiers: [
{
type: "ImportSpecifier",
id: {
type: "Identifier",
name: "foo"
},
name: null,
default: true
},
{
type: "ImportBatchSpecifier",
name: {
type: "Identifier",
name: "bar"
}
}
],
source: {
type: "Literal",
value: "baz",
raw: "'baz'"
}
}]
}, {ecmaVersion: 6});