mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
fixes #1848: line number reported as NaN in interpolation parse errors
This commit is contained in:
parent
fbe84e376c
commit
a296957771
2 changed files with 4 additions and 4 deletions
|
@ -507,8 +507,8 @@
|
||||||
}
|
}
|
||||||
if (len = nested.length) {
|
if (len = nested.length) {
|
||||||
if (len > 1) {
|
if (len > 1) {
|
||||||
nested.unshift(['(', '(']);
|
nested.unshift(['(', '(', this.line]);
|
||||||
nested.push([')', ')']);
|
nested.push([')', ')', this.line]);
|
||||||
}
|
}
|
||||||
tokens.push(['TOKENS', nested]);
|
tokens.push(['TOKENS', nested]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -458,8 +458,8 @@ exports.Lexer = class Lexer
|
||||||
nested.shift() if nested[0]?[0] is 'TERMINATOR'
|
nested.shift() if nested[0]?[0] is 'TERMINATOR'
|
||||||
if len = nested.length
|
if len = nested.length
|
||||||
if len > 1
|
if len > 1
|
||||||
nested.unshift ['(', '(']
|
nested.unshift ['(', '(', @line]
|
||||||
nested.push [')', ')']
|
nested.push [')', ')', @line]
|
||||||
tokens.push ['TOKENS', nested]
|
tokens.push ['TOKENS', nested]
|
||||||
i += expr.length
|
i += expr.length
|
||||||
pi = i + 1
|
pi = i + 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue