Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ade269e

Browse files
committedMay 10, 2017
prepare for macrocall having a source location argument
JuliaLang/julia#21746
1 parent 459116c commit ade269e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎src/DocSystem.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ binding(m::Module, λ::Any) = binding(λ)
8888

8989
function signature(x, str::AbstractString)
9090
ts = Base.Docs.signature(x)
91-
(Meta.isexpr(x, :macrocall, 1 + Compat.macros_have_sourceinfo) && !endswith(strip(str), "()")) ? :(Union{}) : ts
91+
(Meta.isexpr(x, :macrocall, 1 + Compat.macros_have_sourceloc) && !endswith(strip(str), "()")) ? :(Union{}) : ts
9292
end
9393
if VERSION < v"0.5.0-dev"
9494
Base.Docs.signature(::Any) = :(Union{})

‎src/Utilities/Utilities.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Returns a expression that, when evaluated, returns an [`Object`](@ref) represent
238238
function object(ex::Union{Symbol, Expr}, str::AbstractString)
239239
binding = Expr(:call, Binding, splitexpr(Docs.namify(ex))...)
240240
signature = Base.Docs.signature(ex)
241-
isexpr(ex, :macrocall, 1 + Compat.macros_have_sourceinfo) && !endswith(str, "()") && (signature = :(Union{}))
241+
isexpr(ex, :macrocall, 1 + Compat.macros_have_sourceloc) && !endswith(str, "()") && (signature = :(Union{}))
242242
Expr(:call, Object, binding, signature)
243243
end
244244

@@ -275,7 +275,7 @@ if VERSION < v"0.5-"
275275
end
276276
else
277277
function docs(ex::Union{Symbol, Expr}, str::AbstractString)
278-
isexpr(ex, :macrocall, 1 + Compat.macros_have_sourceinfo) && !endswith(rstrip(str), "()") && (ex = quot(ex))
278+
isexpr(ex, :macrocall, 1 + Compat.macros_have_sourceloc) && !endswith(rstrip(str), "()") && (ex = quot(ex))
279279
:(Base.Docs.@doc $ex)
280280
end
281281
end

0 commit comments

Comments
 (0)
Please sign in to comment.