I just recently found out, that you can actually do
@macro(args...) do x
...
end
Not on 0.7 anymore though:
julia> macro test(args...)
println(args)
end
julia> @test(test) do x
println(x)
end
ERROR: syntax: invalid macro usage "@(test(lol) do x
# REPL[70], line 2
println(x)
end)"
Is this a regression, or did this get removed?
This is probably due to changing the parsing of do to preserve the do syntax, rather than parsing it like other function calls. I think it could be made to work again though.
Awesome, thank you!
Most helpful comment
This is probably due to changing the parsing of
doto preserve thedosyntax, rather than parsing it like other function calls. I think it could be made to work again though.