ExprTools.jl
ExprTools.jl copied to clipboard
Function to generate a call from the def Dict
Given the dict returned by splitdef
it would be useful to have a function the generate a Expr(:call,...
to the function that is defined.
e.g.
julia> k = splitdef(:(f(x::Int) = 2x))
Dict{Symbol,Any} with 4 entries:
:args => Any[:(x::Int)]
:body => quote…
:name => :f
:head => :(=)
julia> call_expr(k) == :(f(x))
This is basically a much simpler version of combinedef
That's reasonable. I'd have to think about naming a little more here
In a meaningful way #17 addresses this. Not entirely, though.