Skip to content

Instantly share code, notes, and snippets.

@tonini
Created October 29, 2015 07:31
Show Gist options
  • Select an option

  • Save tonini/01c0e4ba545c62e87785 to your computer and use it in GitHub Desktop.

Select an option

Save tonini/01c0e4ba545c62e87785 to your computer and use it in GitHub Desktop.
def parse_definitions(ast) do
acc = []
Macro.postwalk(ast, acc, fn
{:def, [line], [{name, _, _}, _]} ->
[{:def, name}, {:line, line}]
other -> other
end)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment