use super::*;
impl PrettyPrint for EnumerateDeclaration {
fn pretty(&self, theme: &PrettyProvider) -> PrettyTree {
let mut terms = PrettySequence::new(4);
terms += theme.keyword("enumerate");
terms += " ";
terms += self.namepath.pretty(theme);
terms += self.body.pretty(theme);
terms.into()
}
}
impl PrettyPrint for EnumerateFieldDeclaration {
fn pretty(&self, theme: &PrettyProvider) -> PrettyTree {
let mut terms = PrettySequence::new(3);
terms += self.name.pretty(theme);
if let Some(value) = &self.value {
terms += " ";
terms += theme.operator("=");
terms += " ";
terms += value.pretty(theme);
}
terms += ",";
terms.into()
}
}