@@ -1504,14 +1504,14 @@ function parse($TEXT, options) {
|
||||
}
|
||||
|
||||
function export_default_decl() {
|
||||
switch (S.token.value) {
|
||||
case "async":
|
||||
if (is("name", "async")) {
|
||||
if (!is_token(peek(), "keyword", "function")) return;
|
||||
next();
|
||||
next();
|
||||
if (!is("operator", "*")) return maybe_named(AST_AsyncDefun, function_(AST_AsyncFunction));
|
||||
next();
|
||||
return maybe_named(AST_AsyncGeneratorDefun, function_(AST_AsyncGeneratorFunction));
|
||||
} else if (is("keyword")) switch (S.token.value) {
|
||||
case "class":
|
||||
next();
|
||||
return maybe_named(AST_DefClass, class_(AST_ClassExpression));
|
||||
@@ -1524,13 +1524,13 @@ function parse($TEXT, options) {
|
||||
}
|
||||
|
||||
var export_decl = embed_tokens(function() {
|
||||
switch (S.token.value) {
|
||||
case "async":
|
||||
if (is("name", "async")) {
|
||||
next();
|
||||
expect_token("keyword", "function");
|
||||
if (!is("operator", "*")) return function_(AST_AsyncDefun);
|
||||
next();
|
||||
return function_(AST_AsyncGeneratorDefun);
|
||||
} else if (is("keyword")) switch (S.token.value) {
|
||||
case "class":
|
||||
next();
|
||||
return class_(AST_DefClass);
|
||||
|
||||
Reference in New Issue
Block a user