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

Defines or throws a compile error

Error Example

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

Throwing Example

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