Fix await in function name and parameters#7727
Conversation
nicolo-ribaudo
commented
Apr 13, 2018
| Q | A |
|---|---|
| Fixed Issues? | |
| Patch: Bug Fix? | y |
| Major: Breaking Change? | |
| Minor: New Feature? | |
| Tests Added + Pass? | Yes |
| Documentation PR | |
| Any Dependency Changes? | |
| License | MIT |
| return this.finishNode(node, "MemberExpression"); | ||
| } else if (!noCalls && this.match(tt.parenL)) { | ||
| const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; | ||
| const oldYOAIPAP = this.state.yieldOrAwaitInPossibleArrowParameters; |
There was a problem hiding this comment.
Any sugestion for a shorter name than yieldOrAwaitInPossibleArrowParameters? 😆
There was a problem hiding this comment.
None other than Parameters -> Params, but not a huge difference lol
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/9338/ |
| JSX_invalid/migrated_0000.js | ||
| arrow_function_invalid/migrated_0002.js | ||
| async_await/async_generic_method.js | ||
| async_await/migrated_0007.js |
There was a problem hiding this comment.
I think that this test is wrong (because of https://tc39.github.io/ecma262/#sec-identifiers-static-semantics-early-errors)
https://github.com/facebook/flow/blob/master/src/parser/test/flow/async_await/migrated_0007.js
c2ee6bc to
bdf4159
Compare
bdf4159 to
3e1fad3
Compare
danez
left a comment
There was a problem hiding this comment.
Looks good to me. No idea for a way shorter name though.
For reference here are the fixes that acorn did to fix nearly the same things:
acornjs/acorn@7163d84
acornjs/acorn@5ab3d01
|
FYI: The tests of this PR were put into |
|
Thank you! |