coffee-script
coffee-script copied to clipboard
Add error message when defer slot is a function call
This turned out to be an evening project to make the tests pass again on latest node and npm.
PR fixes compilation error during await foo defer err result, which because of lack of comma is compiled as await foo(defer(err(result))) and err(result) is not valid slot. It's so not valid that it even crashes compiler.
» echo "await func defer err foo" | iced -cpbs
TypeError: a.icedToSlot is not a function
at /usr/local/lib/node_modules/iced-coffee-script/lib/coffee-script/nodes.js:3196:27
at new Defer (/usr/local/lib/node_modules/iced-coffee-script/lib/coffee-script/nodes.js:3199:9)
at Object.anonymous (/usr/local/lib/node_modules/iced-coffee-script/lib/coffee-script/parser.js:312:58)
at Parser.parse (/usr/local/lib/node_modules/iced-coffee-script/lib/coffee-script/parser.js:690:36)
» echo "await func defer err foo" | ./bin/coffee -cpbs
[stdin]:1:18: error: function call cannot be a slot for defer
await func defer err foo
^^^^^^^
I think you need to hit merge as well. Thanks!
ah, but I didn't touch the version string anywhere. please hold
Done! Bumped version and recompiled browser bundle