xee-xpath-macros 0.1.4

Proc macros for xee-interpreter function library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// macros taken from pyo3  pyo3-macros-backend/src/utils.rs

// Macro inspired by `anyhow::bail!` to return a compiler error with the given span.
macro_rules! bail_spanned {
    ($span:expr => $msg:expr) => {
        return Err(err_spanned!($span => $msg))
    };
}

/// Macro inspired by `anyhow::anyhow!` to create a compiler error with the given span.
macro_rules! err_spanned {
    ($span:expr => $msg:expr) => {
        syn::Error::new($span, $msg)
    };
}