merging in @fjakobs's heregex line number fix; closes #1374
This commit is contained in:
parent
abb11a7c0e
commit
19520d8d35
|
@ -194,12 +194,14 @@
|
||||||
return script.length;
|
return script.length;
|
||||||
};
|
};
|
||||||
Lexer.prototype.regexToken = function() {
|
Lexer.prototype.regexToken = function() {
|
||||||
var match, prev, regex, _ref2;
|
var length, match, prev, regex, _ref2;
|
||||||
if (this.chunk.charAt(0) !== '/') {
|
if (this.chunk.charAt(0) !== '/') {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (match = HEREGEX.exec(this.chunk)) {
|
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);
|
prev = last(this.tokens);
|
||||||
if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) {
|
if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) {
|
||||||
|
|
Loading…
Reference in New Issue