Hi!

Was messing around with exceptions, and trying to see under the hood and 
construct macro expressions. 

Eg, Meta.show_sexpr(:(:(+ 1 2))) -> (:quote, (:call, :+, 1, 2))

but how do you build an unquote expression?

Meta.show_sexpr(:(:($(x+5) + 1))) -> (:quote, (:call, :+, (:$, (:call, :+, 
:x, 5)), 1))


But Expr(:quote, Expr(:call, :+, Expr(:$, Expr(:call, :+, :x, 5)), 1)) -> 
:($(Expr(:quote, :($(Expr(:$, :(x + 5))) + 1))))

In other words, it's not processing into the appropriate expression, and 
there's some weird intermediate syntax going on. 


How does one build an unquote expression? I.e, an expression that would 
eval to unquoting a variable?

Reply via email to