Skip to content

Commit

Permalink
Fixed parse error position: start line number and column number from 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikokostya committed Nov 23, 2011
1 parent e751e36 commit 2ee365b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/parse-js.js
Expand Up @@ -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;
};

Expand Down

0 comments on commit 2ee365b

Please sign in to comment.