I see nothing about this 
in 
http://julia.readthedocs.org/en/latest/manual/metaprogramming/#macro-invocation

What's the logic behind reading macro arguments like this? Is it supposed 
to be this way? I found this syntax confusing.

julia> macro test(args...); @show args; args[1]; end

julia> @test 1, 2, 3, 4
args = (:((1,2,3,4)),)
(1,2,3,4)

julia> @test 1 2, 3, 4
args = (1,:((2,3,4)))
1

julia> @test 1 2 3 4
args = (1,2,3,4)
1

julia> @test 1, 2 3 4
args = (:((1,2)),3,4)
(1,2)

julia> @test 1, 2 3, 4
args = (:((1,2)),:((3,4)))
(1,2)

Reply via email to