fix error message on wrong-arity call

This commit is contained in:
Alexis Sellier
2012-02-28 18:06:22 +01:00
parent ac226c6b7f
commit 229856d514
2 changed files with 3 additions and 3 deletions

View File

@@ -228,8 +228,8 @@ less.Parser = function Parser(env) {
this.filename = e.filename || env.filename;
this.index = e.index;
this.line = typeof(line) === 'number' ? line + 1 : null;
this.callLine = e.call && (getLocation(e.call, input) + 1);
this.callExtract = lines[getLocation(e.call, input)];
this.callLine = e.call && (getLocation(e.call, input).line + 1);
this.callExtract = lines[getLocation(e.call, input).line];
this.stack = e.stack;
this.column = col;
this.extract = [

View File

@@ -22,7 +22,7 @@ tree.mixin.Call.prototype = {
rules, mixins[m].eval(env, this.arguments, this.important).rules);
match = true;
} catch (e) {
throw { message: e.message, index: e.index, filename: this.filename, stack: e.stack, call: this.index };
throw { message: e.message, index: this.index, filename: this.filename, stack: e.stack };
}
}
}