Hi;
I am having a problem of calling a macro with predetermined values from a
Dictionary.
How do i solve this problem?
Thanks
module X
const cmds = Dict{Symbol,Symbol}(
:L => :leech, :R => :raise
)
macro fun_gen(fname,label)
efname = esc(fname)
elabel = esc(label)
quote
function $(efname)()
$elabel
end
export $(efname)
end
end
for kv in cmds
@fun_gen kv[2] kv[1]
end
end
but this doesn't work.
because @fun_gen exactly takes them as kv[2] kv[1]
How can i do this?
and what is the exact problem here?
Thanks