"Fossies" - the Fresh Open Source Software Archive

Member "julia-1.1.1/share/julia/test/testhelpers/MacroCalls.jl" (16 May 2019, 343 Bytes) of package /linux/misc/julia-1.1.1-linux-i686.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Julia source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # This file is a part of Julia. License is MIT: https://julialang.org/license
    2 
    3 module MacroCalls
    4 
    5 export @macrocall
    6 
    7 macro macrocall(ex)
    8     @assert Meta.isexpr(ex, :macrocall)
    9     ex.head = :call
   10     for i in 2:length(ex.args)
   11         ex.args[i] = QuoteNode(ex.args[i])
   12     end
   13     insert!(ex.args, 3, __module__)
   14     return esc(ex)
   15 end
   16 
   17 end