Skip to content

Commit

Permalink
fix similarterm
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro committed Nov 4, 2021
1 parent 7c280d0 commit 81051d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/expr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ function similarterm(x::Type{Expr}, head, args, symtype=nothing; metadata=nothin
expr_similarterm(head, args, Val{exprhead}())
end

function similarterm(x::Expr, head, args, symtype=nothing; metadata=nothing, exprhead=exprhead(x))
expr_similarterm(head, args, Val{exprhead}())
end


expr_similarterm(head, args, ::Val{:call}) = Expr(:call, head, args...)
expr_similarterm(head, args, ::Val{:macrocall}) = Expr(:macrocall, head, args...) # discard linenumbernodes?
expr_similarterm(head, args, ::Val{eh}) where {eh} = Expr(eh, args...)

2 comments on commit 81051d4

@0x0f0f0f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:
Fixed similarterm for Exprs to support macro calls

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/48291

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.2 -m "<description of version>" 81051d4c5742b26c6a111f432ea9e5714248efea
git push origin v0.2.2

Please sign in to comment.