Jeremy Ashkenas
d6d46697d0
Issue #795 -- clean up low precedence levels
2010-10-24 14:02:59 -04:00
Timothy Jones
99deb8c670
Wrapping only the last line of comprehensions, allowing pure statements anywhere in between.
2010-10-24 18:36:23 +13:00
Timothy Jones
fc332bcfbd
Easing leniency on pure statements.
2010-10-24 06:53:10 +13:00
Timothy Jones
b60afdb619
Merge branch 'master' of github.com:jashkenas/coffee-script
2010-10-24 02:17:44 +13:00
Timothy Jones
3834e7bc33
Revert "Passing the arguments object directly when generating a closure."
...
This reverts commit 7b887f065d .
2010-10-24 02:15:01 +13:00
satyr
0942071517
fixed a regression that for-in was failing to cache the source value
2010-10-23 22:04:58 +09:00
Timothy Jones
7b887f065d
Passing the arguments object directly when generating a closure.
2010-10-24 01:20:16 +13:00
satyr
79148d2940
refactored loop variable caching
2010-10-22 02:07:00 +09:00
satyr
bd10c2f828
implemented for-from-to and removed dotted ranges
2010-10-21 23:06:50 +09:00
Timothy Jones
880c5c8083
Fixing destructor in magicked for. Also making destructors in range loops syntax errors.
2010-10-22 00:34:51 +13:00
Trevor Burnham
5005cb606f
Fixing inconsistencies for index variables
...
See the tests added to test_comprehensions.coffee. Previously, after
`for i in [1..3]`, i was 4. Also, index variables were never set to
any value in comprehensions containing both a closure and a break or
return.
2010-10-19 14:09:16 -04:00
Timothy Jones
7b1902183c
Just catch alls for inner scoping now.
2010-10-20 03:53:38 +13:00
Jeremy Ashkenas
fa95f743f3
Fixing Issue #643 . Be a little bit safer about declaring block variables as close to the block scope as possible.
2010-08-24 22:19:53 -04:00
Jeremy Ashkenas
d286b33601
Fixing closures-generated-within-comprehensions to preserve block local scope for range comprehensions
2010-08-08 10:52:59 -04:00
Jeremy Ashkenas
a59df2cf74
merged in evilpie's fix for faster small range comprehensions
2010-07-27 23:00:26 -04:00
Jeremy Ashkenas
051a863ff5
adding slightly optimized syntax for range comprehensions that could care less about the index variable. Issue #547
2010-07-27 22:38:38 -04:00
Jeremy Ashkenas
88847df70b
tests are now passing on symbology
2010-07-24 22:23:37 -07:00
Jeremy Ashkenas
5a34f53689
enhancements to range comprehensions, back to being safe -- and usable downwards without a 'by' clause, and optimized when working with integer literals.
2010-07-17 18:45:29 -04:00
Jeremy Ashkenas
72c4efbc39
adding a new comprehension 'for all key, value of object', which compiles to the naked JS for..in, including enumerable properties inherited from prototypes.
2010-07-15 21:18:35 -04:00
Jeremy Ashkenas
0fcfb80be4
switching 'a in b' to 'a of b', and adding an array presence check for 'a in b'.
2010-06-21 23:51:12 -04:00
Jeremy Ashkenas
d0948e5586
fixing comprehensions to also close over the index variable, if used in an inner function...
2010-06-13 21:43:04 -04:00
Jeremy Ashkenas
b0a45e5b93
Ticket #423 . When functions are generated within comprehensions ... the comprehensions should close over the element instead of sharing it.
2010-06-13 21:21:30 -04:00
Jeremy Ashkenas
e14f4c5db1
First draft of switching the CoffeeScript Compiler over to camelCase. Pour one on the ground for underscores...
2010-06-12 19:05:13 -04:00
Jeremy Ashkenas
47fdcebb01
one more range comprehension vs range literal test, for thoroughness.
2010-05-31 19:43:30 -04:00
Jeremy Ashkenas
8cdd8de360
adding a negative range comprehension test.
2010-05-31 19:41:02 -04:00
Jeremy Ashkenas
f36acc27e5
safely preserving the arguments object through generated closure wrappers.
2010-04-10 14:20:32 -04:00
Jeremy Ashkenas
4a85f3d499
cleaning up tests ... consolidation, consistency...
2010-04-03 10:39:32 -04:00