More concise way of slicing off the last character
This commit is contained in:
committed by
Marijn Haverbeke
parent
6e6c7b0af4
commit
9ff4981ca2
2
acorn.js
2
acorn.js
@@ -834,7 +834,7 @@
|
||||
ch = input.charCodeAt(++tokPos);
|
||||
var octal = /^[0-7]+/.exec(input.slice(tokPos, tokPos + 3));
|
||||
if (octal) octal = octal[0];
|
||||
while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, octal.length - 1);
|
||||
while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1);
|
||||
if (octal === "0") octal = null;
|
||||
++tokPos;
|
||||
if (octal) {
|
||||
|
||||
Reference in New Issue
Block a user