-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Rest params for function declarations #205
Conversation
src/lib/js/value.rs
Outdated
write!(f, "function({}){}", rf.args.join(", "), rf.expr) | ||
write!(f, "function(")?; | ||
let last_index = rf.args.len() - 1; | ||
for (index, arg) in rf.args.iter().enumerate() { |
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.
This loop can be rewritten using .iter().join()
.
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.
An attempt was made, but I'm having trouble converting rf.args
into a format that supports join
.
b5c1f17
to
8ac17fe
Compare
@robertmaloney this is great, do you know why the tests are failing? |
8ac17fe
to
fe1f538
Compare
Fixed test, |
This has already been implemented Thanks anyway @robertmaloney ! |
Happy to see it taken care of, thanks for closing! |
Part of #151
TODO