Skip to content

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Dec 29, 2019

Q                       A
Fixed Issues? It happens to fix this REPL invalid case, which should throw.
Patch: Bug Fix? Yes
Tests Added + Pass? Yes
License MIT

I reorganize the process flow in parser.prototype.parseScript, the code is now more succinct. It happens to fix an edge case of flow typecast in optional call params.

Notable changes:

  • The OptionalMemberExpression is generated in a single branch
  • The OptionalCallExpression shares the same extra logic with CallExpression. It fixes the bug by calling toReferencedListDeep, same as CallExpression.

The new process flow is almost copied from acornjs/acorn#891.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: flow pkg: parser labels Dec 29, 2019
Copy link
Member

@existentialism existentialism left a comment

Choose a reason for hiding this comment

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

👍

@JLHwung JLHwung merged commit 30449fe into babel:master Dec 30, 2019
@JLHwung JLHwung deleted the refactor-parseSubscript branch December 30, 2019 21:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: flow outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants