macro_rules! compiler_error {
    (($id:ident, $pos:expr) $($arg:expr),*) => { ... };
    ([[Define] $name:ident]$(
        $([$($separator:tt)*])?
        $(#[$about:meta])* ($id:ident) $error_type:literal : $($msg:literal),+
    );* $(;)?) => { ... };
    (@count $count:expr, $head:literal) => { ... };
    (@count $count:expr, $head:literal $($tail:literal)+) => { ... };
    (@impl $(#[$about:meta])* $id:ident $error_type:literal $len:expr, $($str:literal)+) => { ... };
    (@trait $(#[$about:meta])* $id:ident $len:expr) => { ... };
}
Expand description

Defines or throws a compile error

Error Example

flexar::compiler_error! {
    [[Define] CompilerErrors]
 
    [Errors]
    /// An example error
    (E001) "example error type": "examle error msg";
    /// Invalid character error
    (E002) "invalid character": "character `", "` is invalid";
}

Throwing Example

flexar::compile_error!((E002, position), '$')