-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
New: Rest Parameter (refs: #10) #57
Conversation
xjamundx
commented
Feb 10, 2015
- test from harmony ported over
- additional tests
- error tests
try { | ||
assert.deepEqual(result, expected); | ||
} catch (e) { | ||
throw result; |
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.
didn't mean to commit this, but it's really helpful for debugging. (will remove :))
Just have one broken test now. Some slightly different line numbers for
|
Works now and a bunch of |
* @param {boolean} expression True if the arrow function is created via an expression. | ||
* Always false for declarations, but kept here to be in sync with | ||
* FunctionExpression objects. | ||
* @returns {ASTNode} An ASTNode representing the entire arrow function expression | ||
*/ | ||
createArrowFunctionExpression: function (params, defaults, body, expression) { | ||
createArrowFunctionExpression: function (params, defaults, body, rest, expression) { |
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 about FunctionExpression
and FunctionDeclaration
?
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.
I think it was actually already there, but I'll add some more tests!
Looks like you're missing changes to support rest params in |
We now have tests for |
Huh, secret implementation details revealed. Looks good! |
New: Rest Parameter (refs: #10)