Would you help me with Macros
Why macros does not see functions: size() or length()?
Julia ver 1.1.1
macro test_macro(e::Expr)
return (ones(size(e)[1]) .+ e)
end
MethodError: no method matching size(::Expr)
Closest candidates are:
size(!Matched::BitArray{1}) at bitarray.jl:77
size(!Matched::BitArray{1}, !Matched::Any) at bitarray.jl:81
size(!Matched::Core.Compiler.StmtRange) at show.jl:1561
...
Stacktrace:
[1] @test_macro(::LineNumberNode, ::Module, ::Expr) at ./In[96]:4774:
Julia ver 1.3 error
LoadError: MethodError: no method matching size(::Expr)
Closest candidates are:
size(!Matched::BitArray{1}) at bitarray.jl:77
size(!Matched::BitArray{1}, !Matched::Integer) at bitarray.jl:81
size(!Matched::Core.Compiler.StmtRange) at show.jl:1598
...
in expression starting at G:\My Drive\Booth\Political_firms\Programs\Jl\TopicModeling_v1.jl:127
@test_macro3(::LineNumberNode, ::Module, ::Expr) at TopicModeling_v1.jl:133