Shift -> Babel AST#545
Conversation
|
It the PR is accepted, I'll have to talk to the people at Shape Security about what to do with my fork of their lib. |
| // let result = babel.transform(wrapForCompiletime(estree, sandboxKeys)); | ||
| let gen = codegen(parsed, new FormattedCodeGen); | ||
| let result = context.transform(gen, { | ||
| // let gen = codegen(parsed, new FormattedCodeGen); |
|
What's the current status on the npm package? |
|
I submitted shapesecurity/shift-spidermonkey-converter-js#17 last week. It would allow Shape Security to host the base converter and then I could host an extension targeting Babel. I'm waiting to hear back from @michaelficarra. I have the Babel extension written and will publish it pending the PR's acceptance and a new published version of shift-spidermonkey-converter (shift-estree-converter?). |
|
@bakkot said he'd take a look at it next week. |
|
I pinged @bakkot a couple of weeks ago, but still haven't heard back. |
|
Sorry about that @gabejohnson. Our current work has taken our focus off the Shift tooling for the time being, and @bakkot will be on hiatus for the next few months, but I promise you we'll get to your PR as soon as we can focus on the Shift tooling again. The ESTree converter is lower on our priority list since it's the only Shift tool we don't actually use in-house at @shapesecurity. But we really appreciate your contributions. |
|
No worries @michaelficarra. Understood. Thanks for the update 🙏 |
This pull request addresses #515. It enables conversion from the Shift AST format used in sweet.js to the Babel format using a fork of shift-spidermonkey-converter: https://github.com/gabejohnson/shift-spidermonkey-converter-js/tree/babel.
The conversion allows Sweet to avoid generating code and passing that code to Babel to be re-parsed.