Re-read only number or string after "use strict".

Fixes double-entering same tokContext for various parentheses.
This commit is contained in:
Ingvar Stepanyan 2015-01-14 23:10:10 +02:00
parent d34aea63ab
commit f6c45ac59f

View File

@ -1289,11 +1289,12 @@
readToken();
}
// Enter strict mode. Re-reads the next token to please pedantic
// tests ("use strict"; 010; -- should fail).
// Enter strict mode. Re-reads the next number or string to
// please pedantic tests ("use strict"; 010; -- should fail).
function setStrict(strct) {
strict = strct;
if (tokType !== _num && tokType !== _string) return;
tokPos = tokStart;
if (options.locations) {
while (tokPos < tokLineStart) {