ExprTools.jl icon indicating copy to clipboard operation
ExprTools.jl copied to clipboard

Function to generate a call from the def Dict

Open oxinabox opened this issue 4 years ago • 2 comments

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

oxinabox avatar Mar 09 '20 15:03 oxinabox

That's reasonable. I'd have to think about naming a little more here

omus avatar Mar 10 '20 18:03 omus

In a meaningful way #17 addresses this. Not entirely, though.

oxinabox avatar Jul 02 '21 15:07 oxinabox