Crate astlib[][src]

Expand description


A libary for generating (and manipulating) abstract syntax trees (AST) using ASDL descriptions.

Note that an AST is very different from a parse tree, and is independent of any specific parser generator.

See this stack overflow answer for details on the difference between AST/parse tree.

See this blog post for more details on what ASDL is (and why it’s still useful). It is written by the Oil Shell people.


Right now, the actual code generation is based on the scripts that CPython uses.

As such, currently using this library requires Python.

In the future, I plan to move the implementation into Rust.

Ideally we can be self-hosting :)

Implementation Status

Right now, this library is just a stub.

The actual code-generation logic has not been implemented yet :(

I plan to reserve on then finish this tomorrow :)