merging in @fjakobs's heregex line number fix; closes #1374

This commit is contained in:
Michael Ficarra 2011-05-19 13:59:58 -04:00
parent abb11a7c0e
commit 19520d8d35
1 changed files with 4 additions and 2 deletions

View File

@ -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)) {