I think you don’t need to eval(jlType) and instead push!(cArgTypesList(esc(jlType))). The eval just gets you an early resolution of the type name to the actual type, so you then proceed putting that type into the AST directly which is not necessary.
For 2, macro usage always generates these LineNumberNodes:
julia> Meta.@dump @macro arg
Expr
head: Symbol macrocall
args: Array{Any}((3,))
1: Symbol @macro
2: LineNumberNode
line: Int64 1
file: Symbol REPL[15]
3: Symbol arg
So if you want to construct the macrocall manually, you can make a LineNumberNode yourself:
macro showmacro(x)
Expr(:macrocall, Symbol("@show"), :(LineNumberNode(@__LINE__, @__FILE__)), x)
end
@showmacro sin(3)
# sin(3) = 0.1411200080598672