fn_bnf

Macro err

source
macro_rules! err {
    ($($vis: vis $name: ident: $message: literal),*$(,)?) => { ... };
}
Expand description

Convenience macro for quickly defining errors with static messages for use in your grammars.

§Usage

err! {
    pub InvalidFloat: "floating point literals must have an integer part",
    pub(crate) InternalError: "internal error (this is a bug, please report)"
}