Valentine Valyaeff
0a6aeef0c9
Fix //= operator ( #4410 )
2016-12-23 14:37:11 +01:00
Simon Lydell
9a0babf5b1
Treat Infinity and NaN as reserved words
...
Fixes #4218 .
2016-03-06 11:41:48 +01:00
Jeremy Ruten
3d7d68a766
Reset @seenFor in lexer before tokenizing
2015-07-07 22:23:26 -06:00
Simon Lydell
24398774fc
Fix #3598 : Make unary + and - generate _refs
...
Before commit c056c93e `Op::isComplex()` used to return true always. As far as I
understand, that commit attempts to exclude code such as `+1` and `-2` from
being marked as complex (and thus getting cached into `_ref` variables
sometimes). CoffeeScript is supposed to generate readable output so that choice
is understandable. However, it also excludes code such as `+a` (by mistake I
believe), which can cause `a` to be coerced multiple times. This commit fixes
this by only excluding unary + and - ops followed by a number.
2015-01-09 18:12:10 +01:00
Michael Ficarra
a2c0106b3f
fixes #3363 : modulo operator evaluation order
2014-02-08 20:56:34 -06:00
Demian Ferreiro
0ad30e9b3f
Fix #3361 , make %% coerce right operand only once
...
Force coercion of right operand once before doing arithmetic with it in the `__modulo` utility function.
2014-02-08 13:24:39 -03:00
Demian Ferreiro
6a43de789f
Simplify modulo tests
2014-01-24 17:55:50 -03:00
Demian Ferreiro
1288786fdc
Make modulo operator convert arguments to numbers
2014-01-24 16:08:39 -03:00
Demian Ferreiro
2b4421fca1
Merge branch 'master' into more-math-operators
...
Conflicts:
lib/coffee-script/grammar.js
lib/coffee-script/lexer.js
lib/coffee-script/nodes.js
lib/coffee-script/parser.js
test/regexps.coffee
2014-01-24 15:40:28 -03:00
xixixao
26dcf025f4
Remove in empty array optimization
2014-01-23 15:09:25 +00:00
Demian Ferreiro
22e8856b4d
Add floor division // and modulo %% operators, and compound forms of the new operators
...
Also kill the empty regex :(
2013-03-25 03:19:05 -03:00
Demian Ferreiro
08b59aef8a
Make power operator have higher precedence than unary operators: +, -, ~, !
2013-03-25 00:05:04 -03:00
Demian Ferreiro
e237abff84
Merge branch 'power-operator' of git://github.com/charliesome/coffee-script into more-math-operators
...
Conflicts:
src/nodes.coffee
test/operators.coffee
2013-03-24 22:47:46 -03:00
Jeremy Ashkenas
b3452c1276
Fixes #2508 -- existential access of the prototype.
2013-03-04 22:07:47 +13:00
Jeremy Ashkenas
f8c751b3a4
adding one more compound operator test for #2627
2013-01-05 18:14:05 -10:00
Jeremy Ashkenas
35787ef79b
Fixes #2567 -- optimize generated code with an existential is directly negated.
2012-10-23 18:17:53 -04:00
Jeremy Ashkenas
879fe3976d
Fixes #2197 -- uncached double existential
2012-04-25 15:04:15 -04:00
Jeremy Ashkenas
b9cfb5a7d8
Fixes #2155 -- existential assignment to a closure
2012-02-29 23:41:57 -05:00
charliesome
3bd4dea305
fix the precedence test so it's actually meaningful
2012-01-11 21:37:06 +11:00
charliesome
a4249fd573
power operator + tests
2012-01-11 17:14:23 +11:00
Michael Ficarra
46b34d4b43
whitespace cleanup
2011-12-24 07:04:34 -05:00
Jeremy Ashkenas
0e40feb9af
prepping for 1.2.0
2011-12-18 13:21:00 -05:00
Jeremy Ashkenas
00f9e244f2
Fixes #1922
2011-12-14 11:32:40 -05:00
Michael Ficarra
cf996d2c4a
quick fix to part of new issue in #1099 :
...
`not in []` unconditionally compiled to `false`
2011-10-03 06:43:00 -04:00
Jeremy Ashkenas
3d91b10927
Fixes #1714
2011-09-20 23:21:46 -05:00
Jeremy Ashkenas
54110c98d9
Issue #1714 ... broken 'in' after raw range 'for'
2011-09-20 22:28:07 -05:00
Jeremy Ashkenas
4419f7ca0f
Issue #1703 , - --x
2011-09-17 22:21:47 -04:00
satyr
2ea51b02cc
fixed #1102 ; lexer: cleaned up unfinished
2011-09-07 02:56:14 +09:00
Michael Ficarra
2ff6c4c3fc
fixes #1630 : in should check indices of the right operand when it can
...
pass a `hasOwnProperty` check for them
2011-08-26 15:44:00 -04:00
Gerald Lewis
197d07cc85
revised tests for #1234 thanks to @michaelficarra
2011-08-12 14:11:44 -04:00
Gerald Lewis
ab0b36a53f
test for #1234
2011-08-10 22:01:47 -04:00
Michael Ficarra
6608a7aa98
fixes #1100 : precedence in or-test compilation of in
2011-08-07 03:43:41 -04:00
Jeremy Ashkenas
d91ccd4003
Issue #1354 , 'in' with splatted arrays.
2011-05-15 18:50:04 -04:00
Michael Ficarra
f03bcc24ad
enhanced tests for #1099 fix
2011-03-27 23:42:49 -04:00
Jann Horn
9d72208d9e
added a test (issue #1099 )
2011-03-27 21:35:29 +02:00
Jeremy Ashkenas
9e2c75b548
removing over-hash-comment
2011-03-11 21:41:12 -05:00
Michael Ficarra
6421c865f5
finished reorganizing test suite
2011-01-03 04:17:00 -05:00
Michael Ficarra
ccae9ea6a8
final waypoint; remaining files to be sorted:
...
* _test_existence.coffee
* _test_pattern_matching.coffee
2011-01-01 23:35:05 -05:00
Michael Ficarra
fb201976b8
test reorganization waypoint #2
2010-12-29 14:06:57 -05:00
Michael Ficarra
dcfdd144d8
test reorganization waypoint
2010-12-29 00:48:54 -05:00
Michael Ficarra
0fd3ed593c
adding new (empty) classifications for tests
2010-12-28 23:33:13 -05:00
Michael Ficarra
8087a5914c
coffee-script/test$ for file in .; do git mv "$file" "_$file"; done
2010-12-28 18:07:15 -05:00
Jeremy Ashkenas
b9c2236885
Merging in MichaelFicarra's refactorTests branch.
2010-12-11 20:30:48 -05:00
Michael Ficarra
113cecc4f0
updated all completed test files except comments.coffee to the new
...
testing mini-framework
2010-12-10 00:23:37 -05:00
Michael Ficarra
049df99afc
consistency: eq(expected,actual), formatting, etc.
2010-12-07 22:04:16 -05:00
Michael Ficarra
574f9afa3d
using nonces more where applicable, also added tests for default
...
arguments
2010-12-03 17:10:36 -05:00
Michael Ficarra
3751ac1784
refactored test_arguments.coffee
2010-12-03 16:24:22 -05:00