Why am I getting the error message below? (I'm fairly new to metaprogramming in Julia.) Thanks.
julia> d = :e
:e
julia> macroexpand(:(b.$d))
:(b.e)
julia> macroexpand(:($d.c))
:(e.c)
julia> macroexpand(:(b.$d.c))
ERROR: unsupported or misplaced expression $
julia> macroexpand(:(b.$(d).c))
ERROR: unsupported or misplaced expression $
julia> macroexpand(:(b.$d.c)) :(b.e.c)Output ofversioninfo():Julia Version 0.4.0-dev+4630 Commit f299fed (2015-05-04 14:29 UTC) Platform Info: System: Linux (x86_64-redhat-linux) CPU: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge) LAPACK: libopenblas LIBM: libopenlibm LLVM: libLLVM-3.3- ptb:(b.$d.c)instead ofmacroexpand(...)? - ptbex = :(b.$d.c)throws the same error as above unfortunately. Must have something to do with the assignment operation. - Jeffmacroexpandshouldn't be needed and you shouldn't be getting that error message. It seems thatex = :((b.$d).c)will do what you want, though. - Toivo Henningsson