Skip to content

Commit a5fde09

Browse files
fix: mark public non-exported names as public for Julia v1.11+
1 parent 1d50ac1 commit a5fde09

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/utils.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
export @esc, isexpr, isline, iscall, rmlines, unblock, block, inexpr, namify, isdef,
22
longdef, shortdef, @expand, makeif, prettify, combinedef, splitdef, splitarg, combinearg
33

4+
macro public(ex)
5+
if VERSION >= v"1.11.0-DEV.469"
6+
args = ex isa Symbol ? (ex,) :
7+
Base.isexpr(ex, :tuple) ? ex.args :
8+
error("@public expects a Symbol or tuple")
9+
esc(Expr(:public, args...))
10+
else
11+
nothing
12+
end
13+
end
14+
15+
@public var"@q", var"@qq", gensym_ids, alias_gensyms, prewalk, postwalk, flatten
16+
417
"""
518
assoc!(d, k, v)
619

0 commit comments

Comments
 (0)