Yeah, I’ve been fiddling around with it… I think you want:
macro mymacro(ex)
return :([[$(esc(ex.args[1])) ], $(ex.args[2]) ])
end
@macroexpand @mymacro mysym[15]
:([[mysym], 15])
??
Yeah, I’ve been fiddling around with it… I think you want:
macro mymacro(ex)
return :([[$(esc(ex.args[1])) ], $(ex.args[2]) ])
end
@macroexpand @mymacro mysym[15]
:([[mysym], 15])
??