Bug 932517 - Followup: remove let-block logic in sloppy mode ES6 let declaration check. (rs=evilpie)

This commit is contained in:
Shu-yu Guo 2015-10-28 14:37:54 -07:00
parent 9b8eefda97
commit bd1d8cf2a8

View File

@ -6678,18 +6678,10 @@ Parser<ParseHandler>::shouldParseLetDeclaration(bool* parseDeclOut)
case TOK_LC:
case TOK_LB:
// A following name is always a declaration.
//
// |let {| and |let [| are destructuring declarations.
*parseDeclOut = true;
break;
case TOK_LP:
// Only parse let blocks for 1.7 and 1.8. Do not expose deprecated let
// blocks to content.
*parseDeclOut = versionNumber() == JSVERSION_1_7 || versionNumber() == JSVERSION_1_8;
break;
default:
break;
}