Missing an `end` in both expressions.
>
julia> macro deftype(name)
ex1 = :(immutable $name end)
end
julia> @deftype foo
julia> foo()
On Thu, Mar 5, 2015 at 5:02 AM, Kaj Wiik <[email protected]> wrote:
> 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
>
>