Bug 1066827 - Part13: Fix conflict with Bug 1088328, caused by the change in TokenStream::matchToken on a CLOSED TREE. r=bbouvier

This commit is contained in:
Tooru Fujisawa 2014-10-28 02:45:00 +01:00
parent 76559da488
commit 50596ce740

View File

@ -3875,13 +3875,18 @@ CheckModuleProcessingDirectives(ModuleCompiler &m)
{
TokenStream &ts = m.parser().tokenStream;
while (true) {
if (!ts.matchToken(TOK_STRING))
bool matched;
if (!ts.matchToken(&matched, TOK_STRING))
return false;
if (!matched)
return true;
if (!IsIgnoredDirectiveName(m.cx(), ts.currentToken().atom()))
return m.fail(nullptr, "unsupported processing directive");
if (!ts.matchToken(TOK_SEMI))
if (!ts.matchToken(&matched, TOK_SEMI))
return false;
if (!matched)
return m.fail(nullptr, "expected semicolon after string literal");
}
}