I'm just learning macros, and I'm confused about how it is possible for a variable name to start with C #, but this is exactly what the macro seems to do successfully. For example, if I want to set a variable equal to 4:
macro testMacro(sym)
esym = esc(sym)
quote
temp = 4
$esym = temp
return
end
end
Then
julia> macroexpand(:(@testMacro α))
quote # none, line 4:
#132#temp = 4 # line 5:
α = #132#temp # line 6:
return
end
julia> @testMacro α
julia> α
4
Please note that the temporary variable is called # 132 # temp, and I understand that it will be evaluated in REPL just like that. However, this seems impossible, as the whole line should now be technically a comment.
If I look at the first expression inside the macro, I get what I cannot reproduce.
julia> macroexpand(:(@testMacro α)).args[2]
:(
julia> ex = :(
ERROR: syntax: incomplete: premature end of input
? , . 1.) , ( ), #? 2.) , julia ?