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

Named export #97

Closed
neumatho opened this issue Sep 28, 2020 · 3 comments · Fixed by #101
Closed

Named export #97

neumatho opened this issue Sep 28, 2020 · 3 comments · Fixed by #101

Comments

@neumatho
Copy link

Hi,

It seems that Meriyah does not comply with the AST standard when having named export, e.g. export * as x from 'a'.

First of all, it creates a ExportNamedDeclaration where it stored an ExportNamespaceSpecifier in the specifiers array. The last one is unknown according to the specifications. If you compare it to Acorn, which seems to do it the right way, then you should create an ExportAllDeclaration and then set the exported property to 'x'.

If you look at the specifications, then you will see that this is the correct way to do it:

https://github.com/estree/estree/blob/master/es2020.md#exportalldeclaration

-Thomas

@KFlash
Copy link
Contributor

KFlash commented Sep 28, 2020

Cc @3cp

@3cp
Copy link
Member

3cp commented Oct 6, 2020

This looks like a new change in syntax. estree/estree#202

@3cp
Copy link
Member

3cp commented Oct 6, 2020

FYI @babel/parser still does the old way like us. I will update our implementation.

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 a pull request may close this issue.

3 participants