Re-read only number or string after "use strict".
Fixes double-entering same tokContext for various parentheses.
This commit is contained in:
parent
d34aea63ab
commit
f6c45ac59f
5
acorn.js
5
acorn.js
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user