Hacker News new | ask | show | jobs
by vbsteven 1887 days ago
You can do this with Rust using a combination of rustc, syn and a build.rs file. Then you can execute more Rust code on the parsed AST.

In the JVM world annotation processors or compiler plugins can have access to the AST during compilation. Both in Kotlin and Java.