• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37527

pending completion
#37527

push

local

web-flow
make `IRShow.method_name` inferrable (#49607)

18 of 18 new or added lines in 3 files covered. (100.0%)

68710 of 81829 relevant lines covered (83.97%)

33068903.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

21.43
/base/docs/core.jl
1
# This file is a part of Julia. License is MIT: https://julialang.org/license
2

3
module CoreDocs
4

5
import ..esc, ..push!, ..getindex, ..unsafe_load, ..Csize_t, ..@nospecialize
6

7
@nospecialize # don't specialize on any arguments of the methods declared herein
8

9
function doc!(source::LineNumberNode, mod::Module, str, ex)
×
10
    push!(DOCS, Core.svec(mod, ex, str, source.file, source.line))
×
11
    nothing
×
12
end
13
const DOCS = Array{Core.SimpleVector,1}()
14

15
isexpr(x, h::Symbol) = isa(x, Expr) && x.head === h
2✔
16

17
lazy_iterpolate(s::AbstractString) = Expr(:call, Core.svec, s)
460✔
18
lazy_iterpolate(x) = isexpr(x, :string) ? Expr(:call, Core.svec, x.args...) : x
3✔
19

20
function docm(source::LineNumberNode, mod::Module, str, x)
×
21
    out = Expr(:call, doc!, QuoteNode(source), mod, lazy_iterpolate(str), QuoteNode(x))
×
22
    if isexpr(x, :module)
×
23
        out = Expr(:toplevel, out, x)
×
24
    elseif isexpr(x, :call)
×
25
    else
26
        out = Expr(:block, x, out)
×
27
    end
28
    return esc(out)
×
29
end
30
docm(source::LineNumberNode, mod::Module, x) =
×
31
    isexpr(x, :->) ? docm(source, mod, x.args[1], x.args[2].args[2]) : error("invalid '@doc'.")
32

33
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc