kamo 0.9.2

A library to assist in the creation of an interpreter or compiler and its associated runtime.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::fmt;

/// Definition of the error messages of the branching parsers.
#[allow(clippy::module_name_repetitions)]
pub enum BranchError {
    /// The parser was unable to match any of the alternative branches.
    NoMatch,
}

impl fmt::Display for BranchError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            Self::NoMatch => write!(f, "unable to match an alternative branch"),
        }
    }
}