fixes #1848: line number reported as NaN in interpolation parse errors

This commit is contained in:
Michael Ficarra 2011-11-10 01:09:43 -05:00
parent fbe84e376c
commit a296957771
2 changed files with 4 additions and 4 deletions

View File

@ -507,8 +507,8 @@
}
if (len = nested.length) {
if (len > 1) {
nested.unshift(['(', '(']);
nested.push([')', ')']);
nested.unshift(['(', '(', this.line]);
nested.push([')', ')', this.line]);
}
tokens.push(['TOKENS', nested]);
}

View File

@ -458,8 +458,8 @@ exports.Lexer = class Lexer
nested.shift() if nested[0]?[0] is 'TERMINATOR'
if len = nested.length
if len > 1
nested.unshift ['(', '(']
nested.push [')', ')']
nested.unshift ['(', '(', @line]
nested.push [')', ')', @line]
tokens.push ['TOKENS', nested]
i += expr.length
pi = i + 1