Artur-Sulej / excellent_migrations

An Elixir tool for checking safety of database migrations.
MIT License
232 stars 25 forks source link

Representing matched code parts as code instead of raw AST #20

Open Artur-Sulej opened 1 year ago

Artur-Sulej commented 1 year ago

Experimenting with macro for increased readability.

Example:

{:rename, location, [{:table, _, _}, [to: {:table, _, _}]]}

⬇️

ast do
  rename(table(_), to: table(_))
end