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
use super::parser::RISCVSegment;

#[derive(Clone, Debug, PartialEq, Eq)]
pub(super) enum MacroParaType {
    Register,
    Immediate,
    Label,
    None,
}

#[derive(Clone, Debug)]
pub(super) struct MacroData {
    pub name: String,
    pub para: Vec<(String, MacroParaType)>,
    pub ret_seg: RISCVSegment,
}

// impl PartialEq for MacroData {
//     fn eq(&self, other: &Self) -> bool {
//         self.name == other.name
//     }
// }

// impl Eq for MacroData {}

// impl PartialOrd for MacroData {
//     fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
//         Some(self.cmp(other))
//     }
// }

// impl Ord for MacroData {
//     fn cmp(&self, other: &Self) -> std::cmp::Ordering {
//         self.name.cmp(&other.name)
//     }
// }