Simon Lydell
4ceb6a6818
Only allow yield return as a statement
...
Fixes #4097 . Also happens to fix #4096 . I also took the liberty to simplify the
error message for invalid use of `yield`.
2015-09-16 17:39:59 +02:00
Andreas Lubbe
c1a9cfa044
Add support for standalone yield
...
This breaks compatibility with
->
yield for i in [1..3]
i * 2
and
->
yield
i * 2
yield's behaviour now mirrors that of return in that it can be used stand alone as well as with expressions. Thus, it currently also inherits the above limitations.
2015-09-13 12:30:59 +02:00
Andreas Lubbe
84c125a71b
yield now behaves as expected around 'this' - fixes https://github.com/jashkenas/coffeescript/issues/3882
2015-02-26 13:01:12 +01:00
Andreas Lubbe
b6012c4617
improved yield return test
2015-02-17 19:11:06 +01:00
Andreas Lubbe
feee6954a6
fixed yield return producing incorrect output when used outside of the last line
2015-02-17 19:11:06 +01:00
Andreas Lubbe
b362bd672c
added a lot of ES6 generator tests
2015-02-15 20:35:22 +01:00
Andreas Lubbe
e3f6e19950
fixed being unable to use 'yield throw'
2015-02-15 19:01:00 +01:00
alubbe
5950d6328d
added tests for yield in switch & for loop expressions
2014-11-21 23:14:53 +01:00
alubbe
dd5da7f5f2
implemented proper precedence for 'yield'
2014-10-13 03:32:02 +02:00
Anatoly Ressin
ec44aba71a
Improved test readability + fixed integer divison
2014-10-12 22:32:02 +03:00
Anatoly Ressin
e8a4e93a72
Added failing test case for the yield precedence
2014-10-12 20:08:28 +03:00
Andreas Lubbe
efca2861a6
added tests for yield, yield from, yield return and yield in if statements
2014-09-06 17:25:44 +02:00
Andreas Lubbe
565d78f00b
removed support for '->*" and '=>*'
2014-09-06 13:38:04 +02:00
Andreas Lubbe
25b1eee293
first attempt at including 'yield*'
2013-12-23 19:32:25 -08:00
Andreas Lubbe
dab4ae9416
'->*' and '=>*' now produce generators
2013-12-19 18:08:25 -08:00
Andreas Lubbe
56b04a58dc
first attempt at using '->*" and '=>*' for generators
2013-12-19 14:21:14 -08:00
Andreas Lubbe
9d29a830df
entire generator test file is now ignored if generators are not available
2013-11-30 12:26:32 -08:00
Andreas Lubbe
74a92db173
improved readability of generator test
2013-11-30 11:45:19 -08:00
Andreas Lubbe
f11ca9888f
added a test for generators
2013-11-29 20:58:26 -08:00