Skip to content

Commit

Permalink
Update ProtoStruct.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Feb 11, 2024
1 parent a090984 commit b1f1124
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/ProtoStruct.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@

macro revisableproto(expr)
@eval __module__ $(_proto(expr))
return
macro proto(revisable, expr)
if revisable == QuoteNode(:revisable)
@eval __module__ $(_proto(expr))
return
elseif revisable == QuoteNode(:standard)
return esc(_proto(expr))
else
error("Version not recognized: use :standard or :revisable")
end
end

macro proto(expr)
Expand Down Expand Up @@ -241,4 +247,3 @@ function _proto(expr)
end
return ex
end

0 comments on commit b1f1124

Please sign in to comment.