Skip to content

Fix #4451 and 4481: default in export statements#4483

Merged
lydell merged 2 commits intojashkenas:masterfrom
GeoffreyBooth:fix-export-default
Apr 3, 2017
Merged

Fix #4451 and 4481: default in export statements#4483
lydell merged 2 commits intojashkenas:masterfrom
GeoffreyBooth:fix-export-default

Conversation

@GeoffreyBooth
Copy link
Collaborator

The lexer was treating every appearance of default within an export statement as the default keyword, leading to #4451. This PR treats default as a keyword in an export statement only when it follows export or as, or is already covered by the grammar as part of an ExportSpecifier, which fixes #4451.

We had the ability to import a module member named default, but not export one. This adds that ability, fixing #4481. Tests for these cases are included.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

“unexpected default” occurred when {default: null} in export default, but {"default": null}.

2 participants