dherman/esprit

Import and Export EStree as json

Closed this issue · 3 comments

Yoric commented

To aid interoperability with other tools not written in Rust, as well as testing, it would be nice if Esprit could import/export ASTs as EStree in JSON.

if I read between the lines correctly, this seems to be intended, but at least according to the documentation at http://esprit.surge.sh/, this doesn't seem to be possible at the moment. Of course, it's entirely possible that I'm misreading the documentation or that it hasn't been updated in a while.

Documentation has certainly not been updated for a while, and for now Esprit can only import ESTree - http://esprit.surge.sh/estree/trait.IntoScript.html - although yes, the intent is to change this to generate it instead, ideally making parser generic over some Builder trait.

This requires time which neither me nor author don't have at the moment, but feel free to send PR - would be happy to review!

Yoric commented

I'll try and do that.

Yoric commented

See #38 for a first attempt.