I have been trying to write a macro that would generate fields in a 
for-loop.

However, when I try to generate the first line I get an error:

julia> macro deftype(name,artype,num)
       ex1 = :(esc( immutable $name))
ERROR: syntax: unexpected ")"

julia> macro deftype(name,artype,num)
       ex1 = :(esc(quote immutable $name end))
ERROR: syntax: extra token ")" after end of expression


There must be a way to do this, I cannot find how...

Thanks,
Kaj

Reply via email to