mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1185106 - Part 9.1: Support async function statement in export default in Parser. r=efaust,till
MozReview-Commit-ID: 5oe1f3MRssu
This commit is contained in:
parent
c5236c1dc9
commit
769d4cad22
@ -5047,6 +5047,20 @@ Parser<FullParseHandler>::exportDeclaration()
|
||||
return null();
|
||||
break;
|
||||
default: {
|
||||
if (tt == TOK_NAME && tokenStream.currentName() == context->names().async) {
|
||||
TokenKind nextSameLine = TOK_EOF;
|
||||
if (!tokenStream.peekTokenSameLine(&nextSameLine))
|
||||
return null();
|
||||
|
||||
if (nextSameLine == TOK_FUNCTION) {
|
||||
tokenStream.consumeKnownToken(nextSameLine);
|
||||
kid = functionStmt(YieldIsName, AllowDefaultName, AsyncFunction);
|
||||
if (!kid)
|
||||
return null();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
tokenStream.ungetToken();
|
||||
RootedPropertyName name(context, context->names().starDefaultStar);
|
||||
nameNode = newName(name);
|
||||
|
Loading…
Reference in New Issue
Block a user