https://github.com/MikeInnes/MacroTools.jl
julia> using MacroTools
julia> ex = :(f(x) = x^2 + 3x + 4)
:(f(x) = begin
#= REPL[2]:1 =#
x ^ 2 + 3x + 4
end)
julia> eval(ex)
f (generic function with 1 method)
julia> def = MacroTools.splitdef(ex)
Dict{Symbol,Any} with 5 entries:
:name => :f
:args => Any[:x]
:kwargs => Any[]
:body => quote…
:whereparams => ()
julia> def[:name]
:f
julia> def[:body]
quote
#= REPL[2]:1 =#
x ^ 2 + 3x + 4
end