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

Parsing error when parsing reexport statement that exports a specifier that is not a valid identifier #20

Open
Andarist opened this issue Apr 17, 2023 · 1 comment

Comments

@Andarist
Copy link

Originally reported here but then I realized that the error was only thrown when this plugin was used

Repro

const { Parser } = require('acorn')
const { importAssertions } = require('acorn-import-assertions')

Parser
  .extend(importAssertions)
  .parse(`export * as '🙈' from 'external'`, { sourceType: 'module', ecmaVersion: 'latest' })

Actual

Uncaught [SyntaxError: Unexpected token (1:12)
] {
  pos: 12,
  loc: Position { line: 1, column: 12 },
  raisedAt: 15
}

Expected

It should parse this input correctly

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

No branches or pull requests

2 participants