mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-31 22:29:56 +00:00
Remove support for non-standard let expressions, part 3: Fix parser code issue.
Tag #773.
This commit is contained in:
+10
-10
@@ -3642,16 +3642,16 @@ Parser<ParseHandler>::deprecatedLetBlock()
|
||||
if (!block)
|
||||
return null();
|
||||
|
||||
MUST_MATCH_TOKEN(TOK_LC, JSMSG_CURLY_BEFORE_LET);
|
||||
|
||||
Node expr = statements(yieldHandling);
|
||||
if (!expr)
|
||||
return null();
|
||||
MUST_MATCH_TOKEN(TOK_RC, JSMSG_CURLY_AFTER_LET);
|
||||
|
||||
addTelemetry(JSCompartment::DeprecatedLetBlock);
|
||||
if (!report(ParseWarning, pc->sc->strict(), expr, JSMSG_DEPRECATED_LET_BLOCK))
|
||||
return null();
|
||||
MUST_MATCH_TOKEN(TOK_LC, JSMSG_CURLY_BEFORE_LET);
|
||||
|
||||
Node expr = statements();
|
||||
if (!expr)
|
||||
return null();
|
||||
MUST_MATCH_TOKEN(TOK_RC, JSMSG_CURLY_AFTER_LET);
|
||||
|
||||
addTelemetry(JSCompartment::DeprecatedLetBlock);
|
||||
if (!report(ParseWarning, pc->sc->strict, expr, JSMSG_DEPRECATED_LET_BLOCK))
|
||||
return null();
|
||||
|
||||
handler.setLexicalScopeBody(block, expr);
|
||||
PopStatementPC(tokenStream, pc);
|
||||
|
||||
Reference in New Issue
Block a user