mudasobwa
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.19.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}]}
]}}
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex











Most Liked- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
mudasobwa
They’ll find
{:container, [container_type: :class …there. I write all my code in an assumption there are many violent java-coders knowing where I live.dimitarvp
Wait until the Java devs find you with the pitchforks and torches for daring not to use “class” but “module” instead.
Asd
How does it compare to TreeSitter ASTs?
Last Post!
mudasobwa
v0.30.0the milestone release with a lot of goodness and 4 new supported languages.:metastaticnow officially supports9programming languages:The upcoming
:metacredoupdate should provide an ability to run credo checks for the codebases in all these languages. Needs further polishing and thorough testing though.¡Enjoy!