Pass env to chunker for use in error messages

This commit is contained in:
Forbes Lindesay
2014-06-06 10:58:29 +01:00
parent 07f9ba258e
commit 8c978cd767
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
var LessError = require('./less-error.js');
// Split the input into chunks.
module.exports = function (parser, input) {
module.exports = function (parser, input, env) {
var len = input.length, level = 0, parenLevel = 0,
lastOpening, lastOpeningParen, lastMultiComment, lastMultiCommentEndBrace,
chunks = [], emitFrom = 0,

View File

@@ -356,7 +356,7 @@ var Parser = function Parser(env) {
parser.imports.contents[env.currentFileInfo.filename] = str;
try {
chunks = chunker(parser, str);
chunks = chunker(parser, str, env);
} catch (ex) {
return callback(new LessError(parser, error, env));
}