Suppose that I have a variable v
and I want to interpolate it into a nested quote expression. I tried double interpolation but it does not work properly…
This is what I want:
julia> :( :( x = 1 ) ) |> dump
Expr
head: Symbol quote
args: Array{Any}((1,))
1: Expr
head: Symbol =
args: Array{Any}((2,))
1: Symbol x
2: Int64 1
And, this is what I got:
julia> v = 1;
julia> :( :( x = $$v ) ) |> dump
Expr
head: Symbol quote
args: Array{Any}((1,))
1: Expr
head: Symbol =
args: Array{Any}((2,))
1: Symbol x
2: Expr
head: Symbol $
args: Array{Any}((1,))
1: Int64 1