-
Notifications
You must be signed in to change notification settings - Fork 571
Description
Inspired by #2204 (which I strongly support), I think we can avoid waiting for language-javascript to support modern JavaScript features by instead implementing a simple lexer. I don't believe we actually require the AST that language-javascript gives us. If we just look for the token sequences that indicate an export, we can infer that the name is exported regardless of context (thus not requiring a full parse). And if I'm not mistaken, the only reason we parse the FFI is to confirm that the required names are exported.
I'd be willing to do this work. Thoughts? Concerns?
edit: I forgot to mention, but this also allows adoption of future ECMAScript features in FFI without explicit support in PureScript, language-javascript, or some dependency. For instance, TypeScript/Flow annotations would pass through just fine.