Created
March 2, 2018 06:41
-
-
Save dwhelan/f3dfbf8b4927099c03e750e5c7f034f8 to your computer and use it in GitHub Desktop.
Print generated Elixir code in a macro to stdio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Something do | |
defmacro __using__(opts) do | |
x = quote do | |
import unquote __MODULE__ | |
@behaviour Doit.Processor | |
unquote build_process_funs(opts, __CALLER__) | |
end | |
# x |> Macro.expand(__ENV__) |> Macro.to_string |> IO.puts | |
x | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment