metaprogramming - Transform quoted elixir code to a code string -
i have situation expecting quoted elixir code atom. if wrong quoted code passed in want raise error , show wrong code was.
simplest way show need example.
quoted_code = quote do: %{} "%{}" = some_func(quoted_code)
you can achieve macro.to_string/2
macro.to_string(quote do: %{}) #=> "%{}"
Comments
Post a Comment