kind-parser 0.1.3

Parser for the kind compiler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
macro_rules! eat_single {
    ($x:expr, $pattern:pat) => {
        $x.eat(|x| match x {
            $pattern => Some(()),
            _ => None,
        })
    };
    ($x:expr, $pattern:pat => $then:expr) => {
        $x.eat(|x| match x {
            $pattern => Some($then),
            _ => None,
        })
    };
}

pub(crate) use eat_single;