eliminate putBack
This commit is contained in:
parent
dd5ab1f10f
commit
fed34c7d07
6
pdf.js
6
pdf.js
@ -271,7 +271,7 @@ var Lexer = (function() {
|
|||||||
var str = ch;
|
var str = ch;
|
||||||
var stream = this.stream;
|
var stream = this.stream;
|
||||||
do {
|
do {
|
||||||
ch = stream.getChar();
|
ch = stream.lookChar();
|
||||||
if (ch == "." && !floating) {
|
if (ch == "." && !floating) {
|
||||||
str += ch;
|
str += ch;
|
||||||
floating = true;
|
floating = true;
|
||||||
@ -284,10 +284,10 @@ var Lexer = (function() {
|
|||||||
} else if (ch == "e" || ch == "E") {
|
} else if (ch == "e" || ch == "E") {
|
||||||
floating = true;
|
floating = true;
|
||||||
} else {
|
} else {
|
||||||
// put back the last character, it doesn't belong to us
|
// the last character doesn't belong to us
|
||||||
stream.putBack();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
stream.getChar();
|
||||||
} while (true);
|
} while (true);
|
||||||
var value = parseFloat(str);
|
var value = parseFloat(str);
|
||||||
if (isNaN(value))
|
if (isNaN(value))
|
||||||
|
Loading…
Reference in New Issue
Block a user