diff --git a/lib/lexer.js b/lib/lexer.js index 7e8f0a4d..d7e40ee1 100644 --- a/lib/lexer.js +++ b/lib/lexer.js @@ -194,12 +194,14 @@ return script.length; }; Lexer.prototype.regexToken = function() { - var match, prev, regex, _ref2; + var length, match, prev, regex, _ref2; if (this.chunk.charAt(0) !== '/') { return 0; } if (match = HEREGEX.exec(this.chunk)) { - return this.heregexToken(match); + length = this.heregexToken(match); + this.line += count(match[0], '\n'); + return length; } prev = last(this.tokens); if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) {