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

Implement ChainExpression type and update MemberExpression #104

Closed

Conversation

junoatwork
Copy link

Fixes #103

See https://github.com/estree/estree/blob/master/es2020.md#chainexpression for reference, or this really long implementation thread at estree for background on how this AST design evolved from the earlier babel efforts implemented in #98.

To implement this, I looked at the current behavior of OptionalCallExpression and OptionalMemberExpression. I was able to preserve the output of OptionalMemberExpression, but the current output for OptionalCallExpression and CallExpression are very divergent: CallExpression prints the function name, while OptionalCallExpression prints the function name and argument values.

Please advise on which approach is preferred.

This is my first PR to this repo, so please offer any change requests, and I'd be happy to make them! Thank you for your time and consideration.

@junoatwork
Copy link
Author

Closing - see #102.

@junoatwork junoatwork closed this Oct 5, 2020
@ljharb
Copy link
Member

ljharb commented Oct 5, 2020

Indeed, duplicate of #102 (this and that are both, unfortunately, breaking changes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support ChainExpression AST node type for optional chaining
2 participants