zdenko
0e7677ad62
Fix #5046 : Adjacent JSX ( #5049 )
...
* Fix #5046 : Adjacent JSX
* check CSX only when wrapped in parentheses
* Fix indentation
* Add test for unlikely, but valid, JSX syntax
2018-05-20 09:39:09 -07:00
Julian Rosse
41185ca7ac
Normalize :: syntax ( #5048 )
...
* normalize :: syntax
* fixes from code review
2018-05-13 12:41:43 -07:00
Julian Rosse
7dbdca8c54
Allow implicit call with class with no body ( #5053 )
...
* allow implicit call with class with no body
* more tests
2018-05-13 12:20:09 -07:00
Julian Rosse
8e66ae404e
fix JSX expression indentation bug ( #5056 )
...
* fix JSX expression indentation bug
* fixes from code review
* tweak test
2018-05-12 18:01:27 -07:00
Geoffrey Booth
fe7554828a
Fix #5034 : Adjacent JSX elements must be wrapped in an enclosing tag ( #5046 )
2018-05-01 08:09:07 -07:00
zdenko
871079b25c
Fix #4876 : remove polyfill for object rest/spread ( #4884 )
...
* object rest/spread
* merge branch 'master' into 'object_rest_spread'
* explore
* Revert "merge branch 'master' into 'object_rest_spread'"
This reverts commit eeeffef55d .
* Revert "explore"
This reverts commit d21cd72aa3 .
* split tests
* improvements
* unassignable rest property
* cleanup
* formatting, cleanup
* handle non-final object-destructured splat
* merge with @helixbass's branch
2018-04-23 09:50:42 -07:00
Ruben Bridgewater
be2b24310f
Fix: a test relied on faulty behavior ( #5028 )
...
`assert.throws` did not test for the error message so far. This
changes it to actually test for the error message.
2018-04-10 09:21:40 -07:00
zdenko
1f9cd4eaf7
Fix #4875 : Asynchronous iterators ( #4893 )
...
* async iterators
* tests; refactor 'For' grammar rules
* async iterator tests
* formatting
2018-04-08 13:42:54 -07:00
Geoffrey Booth
47c491ffa1
Regular expressions s (dotAll) flag ( #4880 )
...
* Support ES2018 regex dotall flag
* Test in Node 9
* Alphabetize regex flags
* Split regex dotall test into its own file, use new feature detection method of loading it
* Update docs to explain compatibility for ES2018 and newer Node features
* Remove unnecessary paragraph
2018-03-30 15:25:41 -07:00
Geoffrey Booth
195a46ab77
Fix #4877 : Exponentiation operators ( #4881 )
...
* Passthrough exponentiation operator; remove tests that are invalid JavaScript
* Treat **= as a passthrough assignment
* Get tests passing in Node 6
* Improve scoping
* Move exponentiation tests into their own file, now that it's filtered out by Cakefile
* Restore original test
2018-03-30 00:47:40 -07:00
zdenko
001f97ac39
Fix #5013 : return statement as an expression ( #5014 )
...
* fix #5013
* disallow statement in the expression
2018-03-17 23:08:43 -07:00
Robert de Forest
ce66a499de
Make node --harmony bin/cake test pass on Node 9 ( #5012 )
...
* Make `node --harmony bin/cake test` pass on Node 9
Make classMaker() explicitly return an object
* Update Travis and AppVeyor to use --harmony and v9
2018-03-17 23:02:40 -07:00
Robert de Forest
5a43b2d7c5
simplified test file skipping ( #4996 ) ( #5003 )
...
simplified test file skipping (#4996 )
2018-03-12 19:03:44 -07:00
zdenko
1869f3121d
Fix: destructuring assignment with an empty array in object ( #5000 )
...
* destructuring assignment with empty array in object
* improvements
2018-03-10 07:39:35 -08:00
zdenko
4c0363fb7c
Fix #5004 : incorrect compiled code when a destructuring array contains accessors ( #5005 )
2018-03-07 15:57:31 -08:00
zdenko
72ab6feb2f
Fix #4889 : for...range loop condition ( #4891 )
...
* fix #4889
* test
* move test from 'control_flow' to 'ranges'
* More range tests
2018-02-20 00:46:20 -08:00
zdenko
eb7009268d
fix #4898 ( #4899 )
2018-02-17 16:57:49 -08:00
zdenko
571e9df335
fix #4874 ( #4888 )
2018-02-08 21:11:11 -08:00
zdenko
ba094126e2
Fix #4882 : Range not declaring var for the "i" ( #4883 )
...
* fix #4882
* test
2018-02-04 13:33:08 -08:00
zdenko
794f65fbd7
Fix #4878 : Compile error when using destructuring with a splat or expansion in an array ( #4879 )
...
* fix #4878
* improvements
* test
* refactor
2018-02-03 13:35:41 -08:00
zdenko
9e80f6fa67
Fix #2047 : Infinite loop possible when for loop with range uses variables ( #4853 )
...
* fix #2047
* Additional check for 'step'; tests
* Fix #4105 (#4855 )
* Update output
* Throw warning for unsupported runtimes, e.g. Node < 6 (#4839 )
* fix #1403 (#4854 )
* Update output
* [Change]: Destructuring with non-final spread should still use rest syntax (#4517 ) (#4825 )
* destructuring optimization
* refactor
* minor improvement, fix errors
* minor refactoring
* improvements
* Update output
* Update output
* Fix #4843 : bad output when assigning to @prop in destructuring assignment with defaults (#4848 )
* fix #4843
* improvements
* typo
* small fix
* Fix #3441 : parentheses wrapping expression throw invalid error (#4849 )
* fix #3441
* improvements
* refactor
* Fix #1726 : expression in property access causes unexpected results (#4851 )
* fix #1726
* Explain what's happening, rather than just linking to an issue
* Updated output
* Optimization
* Update output
* remove casting to number
* cleanup tests
2018-01-31 19:51:43 -08:00
zdenko
0aa77f157a
fix #4871 ( #4872 )
2018-01-31 06:31:52 -08:00
Geoffrey Booth
1849f0db76
Fix #4852 , @get @set implicit object ( #4867 )
...
* Test cases for #4852 , get/set oddities
* Fix soak before accessor call to `get` or `set`
* Fixes #4852 : More get/set cases; cleanup style
* Check for tokens' existence before referencing them
2018-01-30 21:17:55 -08:00
zdenko
d86597dbad
Fix #3306 : trailing comma in a function call in the last line throws a syntax error ( #4860 )
...
* fix #3306
* added test
2018-01-30 21:09:50 -08:00
zdenko
bf91781888
Fix #4868 : Incorrect ‘Can’t call super with @params’ error ( #4869 )
...
* fix #4868
* improvements
* tests
2018-01-30 21:06:54 -08:00
zdenko
70b510bcb7
Fix #3933 : Missing then doesn’t trigger nearby error ( #4862 )
...
* fix #3933
* tests
2018-01-30 15:04:29 -08:00
zdenko
84d596d534
Fix #4437 : variable scope in chained calls ( #4863 )
...
* fix #4437
* tests
2018-01-29 23:01:25 -08:00
zdenko
c804087ec9
Fix #3921 & #2342 : inline function without parentheses used in condition, inline 'else' ( #4838 )
...
* fix #3921 : inline function without parentheses used in condition
* add grammar rules
* fix issue #2343
* typos
* multiple 'else' in line
* close 'else if'
2018-01-28 17:51:57 -08:00
zdenko
74bd537d6c
fix #3909 ( #4861 )
2018-01-28 02:38:39 -08:00
zdenko
0217ed5505
Fix #1726 : expression in property access causes unexpected results ( #4851 )
...
* fix #1726
* Explain what's happening, rather than just linking to an issue
* Updated output
* Optimization
2018-01-15 20:03:01 -08:00
zdenko
e53307b46b
Fix #3441 : parentheses wrapping expression throw invalid error ( #4849 )
...
* fix #3441
* improvements
* refactor
2018-01-15 19:32:27 -08:00
zdenko
c8c8c167d1
Fix #4843 : bad output when assigning to @prop in destructuring assignment with defaults ( #4848 )
...
* fix #4843
* improvements
* typo
* small fix
2018-01-15 19:29:48 -08:00
Geoffrey Booth
7c6f3788ca
Fix #4836 : functions named get or set can be used without parentheses when attached to @ ( #4837 )
2018-01-06 13:58:43 -08:00
Chris Connelly
38f5963b85
Use free variables for anonymous classes ( #4826 )
...
Fixes #4822 .
2017-12-28 14:50:12 -08:00
Chris Connelly
ffbe51e374
Set the context of executable class body wrappers ( #4828 )
...
Fixes #4827 .
2017-12-18 10:51:08 -08:00
zdenko
b1286752b9
improve elision output ( #4824 )
2017-12-10 15:22:34 -08:00
zdenko
5eb9dded52
[Enhancement] Computed property keys ( #4622 ) ( #4803 )
...
* Computed property keys
* refactor
* improvements
* refactor tests
* fix comments
2017-12-08 22:42:47 -08:00
zdenko
7f5ab7eb0d
[Enhancement] CSX fragments syntax ( #4802 ) ( #4804 )
...
* CSX fragments
* regex improvement; tests
* regex improvement
* regex improvement
* bug fix; regex
* Fix style
* Split fragment tests
2017-12-08 22:41:02 -08:00
zdenko
5bc85b8f6d
Fix #4798 : Incorrect output for object rest destructuring inside array destructuring ( #4799 )
...
* fix #4798
* additional tests
2017-12-04 08:00:45 -08:00
zdenko
81d1b511f0
Fix #4811 : Heregex comments cannot contain three slashes in a row ( #4814 )
...
* fix comment with /// in heregex
* cleanup
* improved pattern for comments in heregex; fixed unescaped hashes in lexer.coffee
* improvements
* refactor RegExp
* cleanup
* Improved RegEx
2017-12-03 11:55:26 -08:00
Geoffrey Booth
04959162c6
AppVeyor ( #4812 )
...
* First attempt at using AppVeyor
* Maybe it doesn't like the leading dot?
* Versions are an array
* Fix tests on Windows: for some reason, Windows requires `coffee` to be executed as `node coffee` (in the context of `spawnSync`, at least)
* Use npm@latest, see if that's less noisy
* Nevermind, only an issue on Node 6
* Better to see the NPM version before npm install
2017-12-01 13:19:48 -08:00
zdenko
f14c7ffa3f
Fixes #4684 : Elision ( #4796 )
...
* Elision
* test
* improvements
* grammar optimization
* cleanup
2017-11-28 21:24:18 -08:00
Geoffrey Booth
7864acabc3
Fix #4790 : Double-check that we're not creating a bound generator function, even if the yield got stuffed inside a compiler-generated IIFE ( #4792 )
2017-11-21 17:14:32 -08:00
zdenko
9812d28748
Fix #4787 : Destructuring of objects within arrays can generate invalid JavaScript ( #4791 )
...
* Fix #4787
* simplify condition
2017-11-20 20:00:27 -08:00
zdenko
555c22af58
fix #4580 ( #4793 )
2017-11-20 09:15:19 -08:00
Geoffrey Booth
3f4b03bcff
Fix #4763 : Comments at beginning or end of REPL input shouldn't throw errors ( #4764 )
2017-11-19 11:37:08 -08:00
Geoffrey Booth
637fe305a6
Fix #4774 : export default followed by an object should always work, even if the object contains braces. default shouldn't suppress a newline, we should handle it in the grammar the same way returning an implicit object is handled ( #4783 )
2017-11-15 21:38:05 -08:00
Geoffrey Booth
f3375e798c
Fix #4756 : When moving comments from the children of an Existence, we need to search all its descendants, not just the immediate children ( #4757 )
2017-10-25 22:15:40 -07:00
Geoffrey Booth
e2308093e4
Fix #4752 : Error on calling super with @params in a derived class constructor ( #4754 )
...
* Fix #4752 : Error on calling super with @params in a derived class constructor
* Catch calls to super with not-top-level @params
2017-10-25 22:15:05 -07:00
Geoffrey Booth
0dc4755920
Fix #4747 : Flow local variables ( #4753 )
...
* Fix #4706 : Comments before a PARAM_START token stay before that token
* Simplify nodes
* Add function-in-function test
* Fix #4706 : Comments after class name should go after the identifier that's after `class`, not the variable assigned to
* Fix #4706 : Top-level identifiers with trailing comments get wrapped in parentheses (around the comment too) so that Flow doesn't interpret it as a JavaScript label
* Cleanup
* If the source has parentheses wrapping an identifier followed by a block comment, output those parentheses rather than optimizing them away; this is a requirement of Flow, to distinguish from JavaScript labels
* More tests for Flow comments
* For local variables with trailing inline herecomments, output the comments up in the variable declarations line for Flow compatibility
2017-10-19 06:56:59 -07:00