ratel-core
ratel-core copied to clipboard
Putting the JS AST specification on your radar
I'm currently working on the JavaScript Binary AST TC39 proposal. Part of this proposal is an official AST for JavaScript. While this AST is not final yet, it is stabilizing, so I figured it might be of interest to you: WIP specs.
Extracting a Rust ADT from the WIP specs is pretty easy. If you need, I have code that does it already, and I figure I'll publish it as a separate crate soon.
Hey! That looks super interesting! We already have a way to serialize the AST produced by ratel to ESTree compatible JSON, a binary format would be even better for any cross-platform interaction.
There will be a crate for that, too :)
How robust is your parser at the moment? Would it be useful to try and use it as a built-in parser for the binjs-ref implementation?