I wonder whether you could use Rust's macro system for the AST creation.
I mean, it already builds an AST there, so you could use a macro that exposes a text version of the AST directly from the Rust compiler.
That way you wouldn't need to re-define the language externally.…
I wonder whether you could use Rust's macro system for the AST creation.
I mean, it already builds an AST there, so you could use a macro that exposes a text version of the AST directly from the Rust compiler.
That way you wouldn't need to re-define the language externally.…
Yup, I think you could. Other people suggested this on Reddit as well. This was fun to write though, and relatively quick