-
Notifications
You must be signed in to change notification settings - Fork 859
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
FEAT: Support default arguments in functions #1481
Conversation
@0xe wow great, i really need this feature and i will try to support you to get this out of the door. |
6315a9e
to
482d3d8
Compare
@0xe maybe you can start simple only by supporting scalar values and i think we have to place this behind a feature switch e.g. like this |
594defb
to
e22db83
Compare
a86b9b2
to
5ff61be
Compare
because i like to work on this i removed the draft flag - hope this is ok |
draft flag is back |
Sorry, haven't had the chance to get back at this due to some personal commitments. Should be able to work again on this from next week. |
- Fix arrow function parameters - Gate to VERSION_200 language version - Move tests to separate test class
- Arguments object with default parameters - Function constructor - Array and Object destructuring
011f696
to
d0b6032
Compare
d0b6032
to
28669b6
Compare
97f9995
to
272d432
Compare
Great to see your continued effort to implement this! Think you're getting closer to this PR being ready for review and merge? Not trying to put pressure on or anything, just wondering |
Thank you! Yes, hopefully in a couple of days, I can mark it ready for review. |
What's not implemented yet:
(Added ignored tests for these in |
This is looking good and a very helpful improvement judging from the number of tests that start to pass. Let us know when you have a chance for us to try it out more -- right now it needs another merge with master (sorry, things are actually moving sort of fast with this project!) |
Thank you. Updated with master. |
Thanks a ton for working on this! Right now we haven't been accepting merge commits in this codebase, which is why I'm trying to rebase it. I still think that's good code hygiene but it makes changes like this very difficult. I tried to "git rebase" this branch myself, but I'm having to go through the entire long commit history and essentially try to understand what you tried to do each step of the way, and I quickly realized that I didn't know what you were doing. So, I have to apologize and tell you that I don't think I can merge this as it is. I think that if we want to move this forward, then either:
|
Understood. Let me try to rebase it against master. |
Adds support for default values in function parameters and default values in destructuring assignment.
What's not implemented yet, that I plan to implement subsequently:
(Added ignored tests for these in DefaultParametersTest)