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 destructuring in export declarations #305

Merged
merged 1 commit into from Jul 28, 2018

Conversation

alangpierce
Copy link
Owner

Fixes #297

The export transformation process now finds any declaration on the LHS,
excluding declarations within default values, and modifies them to use exports
syntax. In addition, for object destructures, we need to surround the entire
assignment with parens so that it's treated as a proper assignment. This
required some additional parser information: annotating the end index of an =
token in more cases, as well as identifying object shorthand declarations.

Fixes #297

The export transformation process now finds any declaration on the LHS,
excluding declarations within default values, and modifies them to use `exports`
syntax. In addition, for object destructures, we need to surround the entire
assignment with parens so that it's treated as a proper assignment. This
required some additional parser information: annotating the end index of an `=`
token in more cases, as well as identifying object shorthand declarations.
@alangpierce alangpierce merged commit 1348ef4 into master Jul 28, 2018
@alangpierce alangpierce deleted the implement-export-destructuring branch October 1, 2018 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant