You shouldn't call `eval` in a macro. That's not how macros work or what they are for and you'll quickly find out it's not doing what you thought.
On Monday, May 9, 2016 at 12:17:37 AM UTC-4, Yonghee Kim wrote:
>
> I've ended up creating this macro
>
> macro log(ex)
> local field = eval(ex.args[1].args[2])
> local var = ex.args[2]
>
>
> if ex.head == :(+=)
> println("Item ", field, "+", var)
> elseif ex.head == :(-=)
> println("Item ", field, "-", var)
> end
>
> eval(ex)
>
> end
>
>
