Metastatic is a library that provides a unified MetaAST (Meta-level Abstract Syntax Tree) intermediate representation for parsing, transforming, and analyzing code across multiple programming languages using a three-layer meta-model architecture.
“Build tools once, apply them everywhere,” they Java-evangelists said. I tried my own path to create a universal meta-model for program syntax that enables cross-language code analysis, transformation, and tooling.
Metastatic provides the foundation for that—the MetaAST meta-model and language adapters. Tools that leverage this foundation (mutation testing, purity analysis, complexity metrics) are built separately.
It’s already used in Ragex v0.13.0 — Documentation , https://cure-lang.org, and some WIP pets.
Now it’s probably a good time to release it to the wild.
iex|🌢|1 ▶ Metastatic.quote("defmodule M, do: def forty_two, do: 42", :elixir)
{:ok,
{:container,
[container_type: :module, name: "M", module: "M", language: :elixir, line: 1],
[
{:function_def,
[
name: "forty_two",
params: [],
visibility: :public,
arity: 0,
function: "forty_two",
language: :elixir,
line: 1
], [{:literal, [subtype: :integer], 42}]}
]}}























