mirror of https://github.com/mpastell/Weave.jl
basic assertion
parent
aa63b20e7c
commit
96de887308
|
@ -9,6 +9,7 @@ const FORMATS = Dict{String,WeaveFormat}()
|
|||
register_format!(format_name::AbstractString, format::WeaveFormat) = push!(FORMATS, format_name => format)
|
||||
|
||||
macro define_format(type_name, supertype = WeaveFormat)
|
||||
@assert supertype <: WeaveFormat "$type_name should be subtype of WeaveFormat"
|
||||
return quote
|
||||
struct $(type_name) <: $(supertype)
|
||||
description::String
|
||||
|
|
Loading…
Reference in New Issue