Allow imports in declare module (#315)

* Allow imports in declare module {}

* Rename bodyElement to bodyNode
This commit is contained in:
Daniel Tschinder
2017-01-20 22:19:50 +01:00
committed by GitHub
parent f2df08e253
commit d5cd2c3231
7 changed files with 177 additions and 5 deletions

View File

@@ -1016,7 +1016,7 @@ pp.parseExportSpecifiers = function () {
// Parses import declaration.
pp.parseImport = function (node) {
this.next();
this.eat(tt._import);
// import '...'
if (this.match(tt.string)) {