How to extract the body of a function?

julia> parse("""
 function fun(n::Int)
   s = 2 * n
   println(s)
 end
""")

The result shall be an expression (defined in the Metaprogramming section of the manual). See also JuliaParser.

2 Likes