Tree-sitter solves parsing part, but extracting the data still requires some glue code. I created a query language where the query determines the type of its result, so you don't need to use defensive programming and type checks at runtime. It's similar to tree-sitter native queries, but adds recursion, type annotations and Rust-like error diagnostics.
It compiles to cache-friendly binary representation and runs on special tree-walking VM. The compilation via proc macros is planned in future.