Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
iex> string = "Hello, <%= 2 + 2 %>!"
"Hello, <%= 2 + 2 %>!"
iex(55)> EEx.compile_string string
{:<>, [context: EEx.Engine, import: Kernel],
 [{:__block__, [],
   [{:=, [],
     [{:tmp1, [], EEx.Engine},
      {:<>, [context: EEx.Engine, import: Kernel], ["", "Hello, "]}]},
    {:<>, [context: EEx.Engine, import: Kernel],
     [{:tmp1, [], EEx.Engine},
      {{:., [],
        [{:__aliases__, [alias: false], [:String, :Chars]}, :to_string]}, [],
       [{:+, [line: 1], [2, 2]}]}]}]}, "!"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment