basic assertion

pull/355/head
Shuhei Kadowaki 2020-05-26 10:44:30 +09:00
parent aa63b20e7c
commit 96de887308
1 changed files with 1 additions and 0 deletions

View File

@ -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