* 1.12.7: Update changelog and version number
* Update dependencies
* Improve formatting
* Updated output
* Disable regex Unicode test for runtimes lacking support. Fixes#4610.
* More better
* Bump date
* throw multiline implicit object [Fixes#3199]
* only return
* fix from code review
* test error on non-object
* test error on call indented non-object
* unique test names
* Un-prefer global (#4543)
* 1.12.6 changelog; update NPM module in documentation to be `coffeescript` instead of `coffee-script`; update installation to add note about global vs local `coffee` command
* Update packages
* Updated output
* Simplify changelog
* Fix parenthesized conditions in if-else assignment
* Add compiled output
* Use ‘is’ instead of ‘==‘; ‘right’ is a poor name when you mean ‘correct,’ not the right-hand side of the assignments in this test
Added the missing '#'s for correct string interpolation. Seems like this went unnoticed because in these test cases, the `check` function tests if the compilation fails, which it does either way.
* Use Markdown-It instead of Marked for generating the docs; update package versions
* Fix links to v2 docs
* Bump version to 1.12.5; update changelog and compiled docs output
* Update compiled output for 1.12.5
* Improve styling for tables
* Node comes with NPM nowadays, so there’s not really a reason to install CoffeeScript the non-NPM way
* The cake documentation tasks should each have build and watch modes following the same form
* Refactor the build tasks to be more foolproof, including the parser unless it’s explicitly excluded
* Abstract out testing built code, to prepare for watching the build task
* Cake task to cut a new release
* cake build:watch, based on https://github.com/GeoffreyBooth/coffeescript-gulp
* Coding style
* Tests shouldn’t write files in a watched folder
* Don’t crash if the REPL test history file is already gone by the time we try to delete it
This is an upstream port of https://github.com/decaffeinate/coffeescript/pull/24
In a case like `new A().b(c)`, the jison structure ends up being different from
the resulting AST. To the jison parser, this is the `new` unary operator applied
to the expression `A().b(c)`. When the unary operator is applied, the
`Call.prototype.newInstance` function traverses into the leftmost function call
and sets the `isNew` flag to true, and the `Op` constructor returns the `Call`
node so that the call is used in place of the unary operator. However, the code
wasn't updating the node location data, so this commit fixes that.
It's sort of hard to get the location data in `newInstance`, so we set a flag on
every affected node in `newInstance` and override `updateLocationDataIfMissing`
(which is called with the location data after the fact) so that it updates just
the starting position.
This is an upstream port of https://github.com/decaffeinate/coffeescript/pull/17
The lexer generates fake tokens for interpolated heregexes, and the ending
tokens were being placed where the start (inclusive) and end (inclusive) index
were one past the end of the heregex. This meant that in a case like
`[a ///#{b}///]`, the end tokens of the heregex and also the implicit function
call end were all being placed at the `]`, so the AST location data would say
that the function call ends at the end of the `]`.
To fix, I can just subtract 1 from the position of those ending heregex tokens
so that their end lines up with the end of the heregex itself. This is similar
to previous fixes that changed `OUTDENT` and `CALL_END` tokens so that the end
of the token lines up with the end of the AST node.