guybedford / es-module-lexer

Low-overhead lexer dedicated to ES module parsing for fast analysis
MIT License
917 stars 48 forks source link

More detailed export statement tracking #116

Closed guybedford closed 2 years ago

guybedford commented 2 years ago

The following would be highly useful for export tracking in cycles for ES Module Shims.

This does not need to be comprehensive by any means, but a best effort approach would make progress for ES Module Shims cycle support.

tommie commented 2 years ago

We should also only export local bindings that are valid identifiers

Could you elaborate on what you mean by valid identifiers? I couldn't find an existing function to check that.

Edit: e.g. would you consider "default" a valid identifier, or is that a keyword?

tommie commented 2 years ago

Does the parse() API need to be backwards-compatible, or can this simply change the second element to be an array of objects?