constructivist 0.3.0

Simplify the construction of structured data.
Documentation
1
2
3
4
5
6
7
8
9
#[macro_export]
macro_rules! throw {
    ($loc:expr, $msg:literal) => {
        return Err(syn::Error::new($loc.span(), $msg));
    };
    ($loc:expr, $msg:literal, $($arg:expr),*) => {
        return Err(syn::Error::new($loc.span(), format!($msg, $($arg),*)));
    };
}