How to define a macro that evaluates in local scope

?

julia> macro donothing(ex::Expr)
           return esc(ex)
       end
@donothing (macro with 1 method)

julia> @donothing z = 1
1

julia> z
1
1 Like