src/parser.pegjs: Use radix in |parseInt| calls instead of "0x" prefix

Fixes the following JSHint errors:

  ./src/parser.js: line 2878, col 44, Missing radix parameter.
  ./src/parser.js: line 2949, col 44, Missing radix parameter.
redux
David Majda 13 years ago
parent 13c47d6c4f
commit 67afc788ad

@ -2875,7 +2875,7 @@ PEG.parser = (function(){
}
if (result0 !== null) {
result0 = (function(h1, h2) {
return String.fromCharCode(parseInt("0x" + h1 + h2));
return String.fromCharCode(parseInt(h1 + h2, 16));
})(result0[1], result0[2]);
}
if (result0 === null) {
@ -2946,7 +2946,7 @@ PEG.parser = (function(){
}
if (result0 !== null) {
result0 = (function(h1, h2, h3, h4) {
return String.fromCharCode(parseInt("0x" + h1 + h2 + h3 + h4));
return String.fromCharCode(parseInt(h1 + h2 + h3 + h4, 16));
})(result0[1], result0[2], result0[3], result0[4]);
}
if (result0 === null) {

@ -298,12 +298,12 @@ zeroEscapeSequence
hexEscapeSequence
= "\\x" h1:hexDigit h2:hexDigit {
return String.fromCharCode(parseInt("0x" + h1 + h2));
return String.fromCharCode(parseInt(h1 + h2, 16));
}
unicodeEscapeSequence
= "\\u" h1:hexDigit h2:hexDigit h3:hexDigit h4:hexDigit {
return String.fromCharCode(parseInt("0x" + h1 + h2 + h3 + h4));
return String.fromCharCode(parseInt(h1 + h2 + h3 + h4, 16));
}
eolEscapeSequence

Loading…
Cancel
Save