From 2ee365bb691716dd145eb6d29d93f44b8e82a3ae Mon Sep 17 00:00:00 2001 From: ikokostya Date: Thu, 24 Nov 2011 02:35:07 +0400 Subject: [PATCH] Fixed parse error position: start line number and column number from 1. --- lib/parse-js.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/parse-js.js b/lib/parse-js.js index f5c52879..5bb180c3 100644 --- a/lib/parse-js.js +++ b/lib/parse-js.js @@ -254,9 +254,9 @@ function parse_js_number(num) { function JS_Parse_Error(message, line, col, pos) { this.message = message; - this.line = line; - this.col = col; - this.pos = pos; + this.line = line + 1; + this.col = col + 1; + this.pos = pos + 1; this.stack = new Error().stack; };