1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#[macro_export]
#[allow(clippy::module_name_repetitions)]
macro_rules! ReporterGroup {
    () => {
        $crate::reporter::NullReporter
    };
    ($first_reporter:ident $(,$reporter_tail:ident)*) => {
        {
            unsafe { $crate::reporter::ReporterCombinator::new(
                $first_reporter,
                $crate::ReporterGroup![$($reporter_tail),*],
            ) }
        }
    }
}

#[macro_export]
#[allow(clippy::module_name_repetitions)]
macro_rules! ReporterUnGroup {
    ($reporter:expr => []) => {};
    ($reporter:expr => [$first_reporter:ident $(,$reporter_tail:ident)*]) => {
        {
            let (reporter_front, reporter_tail) = unsafe {
                $reporter.wen()
            };

            $first_reporter = reporter_front;

            $crate::ReporterUnGroup!{reporter_tail => [$($reporter_tail),*]}
        }
    }
}

#[macro_export]
macro_rules! ReporterGroupType {
    () => {
        $crate::reporter::NullReporter
    };
    ($first_reporter:ty $(,$reporter_tail:ty)*) => {
        $crate::reporter::ReporterCombinator<
            $first_reporter,
            $crate::ReporterGroupType![$($reporter_tail),*],
        >
    }
}