Remove cursor
This commit is contained in:
parent
dbb8d02775
commit
6e4fec9218
|
@ -40,13 +40,10 @@ module.exports = (function() {
|
||||||
number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/
|
number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/
|
||||||
};
|
};
|
||||||
|
|
||||||
var input = '',
|
var input = '';
|
||||||
cursor = 0;
|
|
||||||
|
|
||||||
function error(msg) {
|
function error(msg) {
|
||||||
var err = new Error(input + ':' + cursor + ': ' + msg);
|
var err = new Error(input + ': ' + msg);
|
||||||
err.position = cursor;
|
|
||||||
//err.message = msg;
|
|
||||||
err.source = input;
|
err.source = input;
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
@ -265,7 +262,6 @@ module.exports = (function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function consume(size) {
|
function consume(size) {
|
||||||
cursor += size;
|
|
||||||
input = input.substr(size);
|
input = input.substr(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue