line numbers start at 1
This commit is contained in:
@@ -63,7 +63,7 @@ function OutputStream(options) {
|
|||||||
|
|
||||||
var indentation = 0;
|
var indentation = 0;
|
||||||
var current_col = 0;
|
var current_col = 0;
|
||||||
var current_line = 0;
|
var current_line = 1;
|
||||||
var current_pos = 0;
|
var current_pos = 0;
|
||||||
var OUTPUT = "";
|
var OUTPUT = "";
|
||||||
|
|
||||||
|
|||||||
@@ -246,8 +246,8 @@ function parse_js_number(num) {
|
|||||||
|
|
||||||
function JS_Parse_Error(message, line, col, pos) {
|
function JS_Parse_Error(message, line, col, pos) {
|
||||||
this.message = message;
|
this.message = message;
|
||||||
this.line = line + 1;
|
this.line = line;
|
||||||
this.col = col + 1;
|
this.col = col;
|
||||||
this.pos = pos + 1;
|
this.pos = pos + 1;
|
||||||
this.stack = new Error().stack;
|
this.stack = new Error().stack;
|
||||||
};
|
};
|
||||||
@@ -279,7 +279,7 @@ function tokenizer($TEXT, filename) {
|
|||||||
filename : filename,
|
filename : filename,
|
||||||
pos : 0,
|
pos : 0,
|
||||||
tokpos : 0,
|
tokpos : 0,
|
||||||
line : 0,
|
line : 1,
|
||||||
tokline : 0,
|
tokline : 0,
|
||||||
col : 0,
|
col : 0,
|
||||||
tokcol : 0,
|
tokcol : 0,
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ function SourceMap(options) {
|
|||||||
});
|
});
|
||||||
var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig);
|
var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig);
|
||||||
function add(source, gen_line, gen_col, orig_line, orig_col, name) {
|
function add(source, gen_line, gen_col, orig_line, orig_col, name) {
|
||||||
orig_line++;
|
|
||||||
gen_line++;
|
|
||||||
if (orig_map) {
|
if (orig_map) {
|
||||||
var info = orig_map.originalPositionFor({
|
var info = orig_map.originalPositionFor({
|
||||||
line: orig_line,
|
line: orig_line,
|
||||||
|
|||||||
Reference in New Issue
Block a user