Ok, I don't think I am being clear so let me state exactly what I am trying
to do. I have a macro that is going to process a type definition. Something
like this:
@mymacro type SomeType
attr1::Foo
attr2::Bar
attr3::Int64
end
Now here Foo and Bar are presumably some types that have been imported with
'using FooModule' and 'using BarModule' but my macro can't know in advance
what these modules are that contain Foo and Bar. My question is, can my
macro go from the symbol :Foo that it sees as it is processing the AST to
the type Foo?
On Saturday, November 8, 2014 7:35:21 PM UTC-5, Stefan Karpinski wrote:
>
> On Sun, Nov 9, 2014 at 1:30 AM, Sal Mangano <[email protected]
> <javascript:>> wrote:
>
>> But suppose you don't know the module in advance?
>>
>
> No problem:
>
> julia> m = Base
> Base
>
> julia> getfield(m, :Int)
> Int64
>
>