support export statements (#4650)

This commit is contained in:
Alex Lam S.L
2021-02-14 20:13:54 +00:00
committed by GitHub
parent b7219ac489
commit c21f096ab8
9 changed files with 526 additions and 16 deletions

View File

@@ -249,12 +249,14 @@ function first_in_statement(stack, arrow) {
if (p.expression === node) continue;
} else if (p instanceof AST_Conditional) {
if (p.condition === node) continue;
} else if (p instanceof AST_ExportDefault) {
return false;
} else if (p instanceof AST_PropAccess) {
if (p.expression === node) continue;
} else if (p instanceof AST_Sequence) {
if (p.expressions[0] === node) continue;
} else if (p instanceof AST_Statement) {
return p.body === node;
} else if (p instanceof AST_SimpleStatement) {
return true;
} else if (p instanceof AST_Template) {
if (p.tag === node) continue;
} else if (p instanceof AST_UnaryPostfix) {