JS: support additional export statements for Flow

This commit is contained in:
Esben Sparre Andreasen
2019-01-02 14:18:36 +01:00
parent c6f9a043ca
commit 45a4026385
5 changed files with 447 additions and 91 deletions

View File

@@ -911,6 +911,11 @@ public class FlowParser extends ESNextParser {
List<ExportSpecifier> specifiers = this.parseExportSpecifiers(exports);
this.parseExportFrom(specifiers, null, false);
return null;
} else if (this.eat(TokenType.star)) {
if (this.eatContextual("as"))
this.parseIdent(true);
this.parseExportFrom(null, null, true);
return null;
} else {
// `export type Foo = Bar;`
this.flowParseTypeAlias(startLoc);