Remove ForAwaitStatement, add await flag to ForOfStatement#349
Remove ForAwaitStatement, add await flag to ForOfStatement#349
Conversation
Codecov Report@@ Coverage Diff @@
## 7.0 #349 +/- ##
=======================================
Coverage 97.65% 97.65%
=======================================
Files 19 19
Lines 3277 3277
Branches 867 867
=======================================
Hits 3200 3200
Misses 31 31
Partials 46 46
Continue to review full report at Codecov.
|
|
Oops forgot to add the extra steps about changing to 7.0 branch (did it) |
hzoo
left a comment
There was a problem hiding this comment.
haha I need to make the same change in estree
| node.await = true; | ||
| this.eatContextual("of"); | ||
| type = "ForAwaitStatement"; | ||
| } else { |
There was a problem hiding this comment.
Should we set the node.await to false there? According to the changes in the spec I would expect a boolean.
Since undefined is falsy this isn't an issue.
There was a problem hiding this comment.
Do we do this elsewhere for other flags (false/true)? I think we might
There was a problem hiding this comment.
I also think so. Don't have much context to answer you. Maybe @danez can.
There was a problem hiding this comment.
Using Function as a reference, the generator and async flags are explicitly set to false when they don't apply, so it seems like it should do the same here.
|
I updated the Babel 7 upgrade guide accordingly in babel/website@dd2586a |
|
We need a follow-up story in babel-types, babel-generator and the transforms using |
|
why I wish babylon was in the monorepo again |
|
I created a ticket babel/babel#5286 |
Removes the
ForAwaitStatementnode type and adds anawaitflag to the existingForOfStatementnode!