use crate::convert::{ ToAssembly, Separator };
#[macro_export]
macro_rules! section {
($section:expr) => {
instruction::Mnemonic::Section($section)
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Section {
Text,
Bss,
Data,
Rodata,
}
impl ToAssembly for Section {
fn to_assembly(&self, separator: Separator) -> String {
match self {
_ => format!("section .{:?}", self).to_lowercase()
}
}
}