Is it possible to take a quoted Elixir expression (AST tree) like this:
quote do: 1 + 1
=> {:+, [context: Elixir, import: Kernel], [1, 1]}
And convert it to an Erlang AST?
I looked through the Code module as well as some of the Kernel modules looking for a function that did this but I didn't find anything. I am not even sure if this would be possible... I don't know how things like Elixir macros would be represented in Erlang AST.
Thanks in advance!
There isn't currently a public API to do so. You could look into the elixir module to know how it is done but it is private API and it can be changed any time with no guarantee of compatibility, or even removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With