This repository was archived by the owner on May 19, 2018. It is now read-only.
[7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement - #384
Merged
Conversation
hzoo
force-pushed
the
rest-spread-property
branch
from
February 26, 2017 00:15
c50aab2 to
96560c3
Compare
hzoo
force-pushed
the
rest-spread-property
branch
from
February 26, 2017 00:20
96560c3 to
9cdf422
Compare
Codecov Report
@@ Coverage Diff @@
## 7.0 #384 +/- ##
=========================================
+ Coverage 97.88% 97.9% +0.02%
=========================================
Files 20 20
Lines 3444 3443 -1
Branches 910 910
=========================================
Hits 3371 3371
Misses 30 30
+ Partials 43 42 -1
Continue to review full report at Codecov.
|
danez
reviewed
Feb 27, 2017
|
|
||
| case "SpreadProperty": | ||
| node.type = "RestProperty"; | ||
| case "SpreadElement": |
Member
There was a problem hiding this comment.
SpreadElement should only be converted to RestElement if isBinding === true and otherwise fail.
Previously we were not converting SpreadElement at all, but now we need to in some cases (the cases that were previously SpreadProperty)
Member
Author
There was a problem hiding this comment.
If you have time to finish this up, go ahead 👍
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
need to fix a failing test
estree-throws › es2015/uncategorised/288
/Users/hzhu/dev/babylon/test/utils/runFixtureTests.js:92
91: if (opts.throws) {
92: throw new Error("Expected error message: " + opts.throws + ". But parsing succeeded.");
93: } else {
Error: /Users/hzhu/dev/babylon/test/fixtures/es2015/uncategorised/288/actual.js: Expected error message: Invalid left-hand side in assignment expression (1:1). But parsing succeeded.
Odd that
[...a, b] = cis parsing as a SpreadElement when it should be a RestElement?