diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js index 88a0e9d0..acc7721b 100644 --- a/lib/coffee-script/lexer.js +++ b/lib/coffee-script/lexer.js @@ -363,7 +363,7 @@ return indent.length; } diff = size - this.indent + this.outdebt; - this.token('INDENT', diff, 0, indent.length); + this.token('INDENT', diff, indent.length - size, size); this.indents.push(diff); this.ends.push('OUTDENT'); this.outdebt = this.indebt = 0; diff --git a/src/lexer.coffee b/src/lexer.coffee index fef7c452..452f4b60 100644 --- a/src/lexer.coffee +++ b/src/lexer.coffee @@ -328,7 +328,7 @@ exports.Lexer = class Lexer @suppressNewlines() return indent.length diff = size - @indent + @outdebt - @token 'INDENT', diff, 0, indent.length + @token 'INDENT', diff, indent.length - size, size @indents.push diff @ends.push 'OUTDENT' @outdebt = @indebt = 0