-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CS2] Output ES2015 arrow functions, default parameters, rest parameters #4311
Merged
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
d66e4b1
Eliminate wrapper around “bound” (arrow) functions; output `=>` for s…
GeoffreyBooth b9cc264
Remove irrelevant (and breaking) tests
GeoffreyBooth c046a79
Merge branch 'master' of github.com:GeoffreyBooth/coffeescript into a…
GeoffreyBooth c29bd90
Minor cleanup
GeoffreyBooth 5bc46ec
When a function parameter is a splat (i.e., it uses the ES2015 rest p…
GeoffreyBooth 8b0ece3
Merge branch '2' into arrow-functions
GeoffreyBooth 25fce2e
Merge branch '2' into arrow-functions
GeoffreyBooth a5d63dc
Rearrange function parameters when one of the parameters is a splat a…
GeoffreyBooth a25b9d3
Merge commit 'c5c4d7c8f8648103d5f9dc3aa45f37e325f1842c' into arrow-fu…
GeoffreyBooth 528f007
Handle params like `@param`, adding assignment expressions for them w…
GeoffreyBooth 0433ec0
Add parameter names (not a text like `'\nValue IdentifierLiteral: a'`…
GeoffreyBooth b71335d
Merge branch 'master' into arrow-functions
GeoffreyBooth 387c5bd
For parameters with a default value, correctly add the parameter name…
GeoffreyBooth 1c08aeb
Handle expansions in function parameters: when an expansion is found,…
GeoffreyBooth 2821935
Handle splat parameters the same way we handle expansions: if a splat…
GeoffreyBooth e4c0f22
Fix parameter name when a parameter is a splat attached to `this` (e.…
GeoffreyBooth 2006b2d
Rather than assigning post-splat parameters based on index, use slice…
GeoffreyBooth 1423055
Dial back our w00t indentation
GeoffreyBooth 6288ac8
Better parsing of parameter names (WIP)
GeoffreyBooth 0750ff7
Refactor processing of splat/expansion parameters
GeoffreyBooth f360040
Merge branch '2' into arrow-functions
GeoffreyBooth 3545819
Fix assignment of default parameters for parameters that come after a…
GeoffreyBooth 8c24f76
Better check for whether a param is attached to `this`
GeoffreyBooth 3e889f6
More understandable variable names
GeoffreyBooth cb48a0c
For parameters after a splat or expansion, assign them similar to the…
GeoffreyBooth c0c659f
Don’t add unnamed parameters (like `[]` as a parameter) to the functi…
GeoffreyBooth 6149307
Disallow multiple splat/expansion parameters in function definitions;…
GeoffreyBooth 073b3cd
Fix `this` params not getting assigned if the parameter is after a sp…
GeoffreyBooth a509f53
Allow names of function parameters attached to `this` to be reserved …
GeoffreyBooth 4f4e951
Always add a statement to the function body defining a variable with …
GeoffreyBooth ccb7d84
Aftermath of having both `undefined` and `null` trigger the use of de…
GeoffreyBooth 8e84792
More careful parsing of destructured parameters
GeoffreyBooth 91396cb
Fall back to processing destructured parameters in the function body,…
GeoffreyBooth d75879a
Clean up comments
GeoffreyBooth 51736d4
Restore new bare function test, minus the arrow function part of it
GeoffreyBooth 912ae68
Merge branch 'master' into arrow-functions
GeoffreyBooth 266582c
Merge branch '2' into arrow-functions
GeoffreyBooth 1d5c553
Merge branch '2' into arrow-functions
GeoffreyBooth 755fb5f
Test that bound/arrow functions aren’t overwriting the `arguments` ob…
GeoffreyBooth d5b3270
Follow ES2015 spec for parameter default values: `null` gets assigned…
GeoffreyBooth f46685c
Merge branch '2' into arrow-functions
GeoffreyBooth 375b9a4
Mimic ES default parameters behavior for parameters after a splat or …
GeoffreyBooth efbfdf0
Merge branch '2' into arrow-functions
GeoffreyBooth 2dd222b
Merge branch '2' into arrow-functions
GeoffreyBooth 5b1426b
Merge branch '2' into arrow-functions
GeoffreyBooth 9b4d6d7
Merge branch '2' into arrow-functions
GeoffreyBooth 59233ee
Bound functions cannot be generators: remove no-longer-relevant test,…
GeoffreyBooth 37bdef4
Error for bound generator functions should underline the `yield`
GeoffreyBooth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will this look like if the function is multi-line? Is it better to underline
yield
only?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just underlines whatever the first line of the function is, starting at the
=>
: