Bug 1185106 - Part 8.1: Treat await as keyword in module. r=efaust,till
MozReview-Commit-ID: JnnXaIJvPGW
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -1964,16 +1964,17 @@ Parser<FullParseHandler>::moduleBody(Mod
ParseContext::VarScope varScope(this);
if (!varScope.init(pc))
return nullptr;
Node mn = handler.newModule();
if (!mn)
return null();
+ AutoAwaitIsKeyword awaitIsKeyword(&tokenStream, true);
ParseNode* pn = statementList(YieldIsKeyword);
if (!pn)
return null();
MOZ_ASSERT(pn->isKind(PNK_STATEMENTLIST));
mn->pn_body = pn;
TokenKind tt;