defmodule WackyMacro do defmacro defalias(alias_name, alias_path) do quote bind_quoted: [alias_name: alias_name, alias_path: alias_path] do defmacro unquote(:"get_#{alias_name}")(path) do quote bind_quoted: [path: path, alias_path: alias_path] do get(var!(assigns).render_meta.parsed, alias_path ++ path) end end end end end