Skip to content

Export star from lib fails to parse #124

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
DanBurton opened this issue Sep 8, 2020 · 0 comments
Open

Export star from lib fails to parse #124

DanBurton opened this issue Sep 8, 2020 · 0 comments

Comments

@DanBurton
Copy link

λ> parseModule "export {x} from 'lib.mjs';" "src"
Right (JSAstModule [JSModuleExportDeclaration (JSAnnot (TokenPn 0 1 1) []) (JSExportFrom (JSExportClause (JSAnnot (TokenPn 7 1 8) [WhiteSpace (TokenPn 6 1 7) " "]) (JSLOne (JSExportSpecifier (JSIdentName (JSAnnot (TokenPn 8 1 9) []) "x"))) (JSAnnot (TokenPn 9 1 10) [])) (JSFromClause (JSAnnot (TokenPn 11 1 12) [WhiteSpace (TokenPn 10 1 11) " "]) (JSAnnot (TokenPn 16 1 17) [WhiteSpace (TokenPn 15 1 16) " "]) "'lib.mjs'") (JSSemi (JSAnnot (TokenPn 25 1 26) [])))] (JSAnnot (TokenPn 0 0 0) []))

λ> parseModule "export * from 'lib.mjs';" "src"
Left "MulToken {tokenSpan = TokenPn 7 1 8, tokenComment = [WhiteSpace (TokenPn 6 1 7) \" \"]}"

Expected export * from 'lib.mjs' to parse as valid JavaScript.
Actual: it doesn't.

See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export

DanBurton added a commit to reach-sh/language-javascript that referenced this issue Sep 16, 2020
DanBurton added a commit to reach-sh/language-javascript that referenced this issue Jan 6, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant