Skip to content
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

Fix await in function name and parameters #7727

Merged
merged 3 commits into from Nov 6, 2018

Conversation

nicolo-ribaudo
Copy link
Member

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

@nicolo-ribaudo nicolo-ribaudo added PR: Spec Compliance 👓 A type of pull request used for our changelog categories pkg: parser labels Apr 13, 2018
@@ -525,10 +525,15 @@ export default class ExpressionParser extends LValParser {
}
return this.finishNode(node, "MemberExpression");
} else if (!noCalls && this.match(tt.parenL)) {
const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
const oldYOAIPAP = this.state.yieldOrAwaitInPossibleArrowParameters;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any sugestion for a shorter name than yieldOrAwaitInPossibleArrowParameters? 😆

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None other than Parameters -> Params, but not a huge difference lol

@babel-bot
Copy link
Collaborator

babel-bot commented Apr 13, 2018

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/9338/

@@ -12,6 +12,7 @@ ES6/binding-pattern/object-pattern/await-prop-in-async-function.js
JSX_invalid/migrated_0000.js
arrow_function_invalid/migrated_0002.js
async_await/async_generic_method.js
async_await/migrated_0007.js
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@danez danez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@danez
Copy link
Member

danez commented Dec 3, 2018

FYI: The tests of this PR were put into packages/babylon/tests/..., they are now moved to babel-parser in fa9df67 and run correctly :)

@nicolo-ribaudo
Copy link
Member Author

Thank you!

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Spec Compliance 👓 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants