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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -