зеркало из https://github.com/mozilla/gecko-dev.git
Micro-fix to the parser for a linking issue that *seemingly* should affect everyone, yet hasn't produced any complaints I'm aware of yet. No bug, r=me for a trivial refactoring that evades the problem
--HG-- extra : rebase_source : f9a5538c0d20e4a77b6d692b13849e32a5015a35
This commit is contained in:
Родитель
34a6dca7cc
Коммит
3214fcbcb6
|
@ -6705,10 +6705,15 @@ Parser<ParseHandler>::statement(YieldHandling yieldHandling, bool canHaveDirecti
|
|||
return expressionStatement(yieldHandling);
|
||||
|
||||
case TOK_YIELD: {
|
||||
// Don't use a ternary operator here due to obscure linker issues
|
||||
// around using static consts in the arms of a ternary.
|
||||
TokenStream::Modifier modifier;
|
||||
if (yieldExpressionsSupported())
|
||||
modifier = TokenStream::Operand;
|
||||
else
|
||||
modifier = TokenStream::None;
|
||||
|
||||
TokenKind next;
|
||||
TokenStream::Modifier modifier = yieldExpressionsSupported()
|
||||
? TokenStream::Operand
|
||||
: TokenStream::None;
|
||||
if (!tokenStream.peekToken(&next, modifier))
|
||||
return null();
|
||||
if (next == TOK_COLON) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче