-
Notifications
You must be signed in to change notification settings - Fork 208
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
Updating codegen #742
Comments
I'd be in favor of the Babel option. Perhaps even better would be to do an AST transform instead. Then handoff to Babel. See #515 and shapesecurity/shift-spidermonkey-converter-js#16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a PR to add
async
/await
support #741 and @slotik is working on adding type nodes to sweet's AST sweet-js/sweet-spec#4. Both of these efforts require some way of doing codegen but at the moment we are relying on shift-codegen which only supports ES2016 (no async/await). Shift-codegen will be updated to ES2017 soon but it is unlikely to get support for type annotations so what should we do?There are a few options I can see.
At the moment I'm leaning towards the babel option since I think it's the least amount of work for us and often you want to use babel as a backend anyway. Arguably writing our own codgen is the best long-term since that give us the most flexibility (and it would allow us to do things like rendering syntax declarations
syntax m = ctx => ...
).Thoughts? Am I forgetting an option?
/cc @gabejohnson
The text was updated successfully, but these errors were encountered: