From 6e4fec9218134de5bf900b25020945c98082699d Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Sat, 6 Sep 2014 18:02:18 +0200 Subject: [PATCH] Remove cursor --- gradient-parser.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gradient-parser.js b/gradient-parser.js index ccc2104..50fdac1 100644 --- a/gradient-parser.js +++ b/gradient-parser.js @@ -40,13 +40,10 @@ module.exports = (function() { number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/ }; - var input = '', - cursor = 0; + var input = ''; function error(msg) { - var err = new Error(input + ':' + cursor + ': ' + msg); - err.position = cursor; - //err.message = msg; + var err = new Error(input + ': ' + msg); err.source = input; throw err; } @@ -265,7 +262,6 @@ module.exports = (function() { } function consume(size) { - cursor += size; input = input.substr(size); }