You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm upgrading the sbt-coffeescript plugin and encountered an error on one of our unit tests. When upgrading from CoffeeScript 1.7.1 to 1.11.0 (I know this isn't the latest version) I noticed that our unit test that extracts line numbers from compile errors was failing. This error also occurs on the online console (version 1.12.6).
When the input to the compile function is * or *whateveryouwanthere then the lexer throws an exception.
TypeError: Cannot read property '0' of undefined
at Lexer.exports.Lexer.Lexer.literalToken (...lib/coffee-script/lexer.js:550:39)
at Lexer.exports.Lexer.Lexer.tokenize (...lib/coffee-script/lexer.js:35:203)
at Object.<anonymous> (...lib/coffee-script/coffee-script.js:63:20)
at Object.compile (...lib/coffee-script/coffee-script.js:44:19)
at ../coffee.js:58:46
at tryToString (fs.js:414:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)
The expected result was an error like Error on line 1: unexpected *.
The lexer handles this properly if the * character is on the start of line 2 instead of line 1.
The text was updated successfully, but these errors were encountered:
GeoffreyBooth
changed the title
Input of asterisk (*) throws exception
Lexer: Input of asterisk (*) throws exception
Jun 15, 2017
I'm upgrading the sbt-coffeescript plugin and encountered an error on one of our unit tests. When upgrading from CoffeeScript 1.7.1 to 1.11.0 (I know this isn't the latest version) I noticed that our unit test that extracts line numbers from compile errors was failing. This error also occurs on the online console (version 1.12.6).
When the input to the compile function is
*
or*whateveryouwanthere
then the lexer throws an exception.The expected result was an error like
Error on line 1: unexpected *
.The lexer handles this properly if the
*
character is on the start of line 2 instead of line 1.The text was updated successfully, but these errors were encountered: