use super::trivia::Trivia;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Item<T> {
Item(T),
Comments(Trivia),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Items<T>(pub Vec<Item<T>>);
impl<T> Items<T> {
pub fn has_only_comments(&self) -> bool {
!self.0.is_empty() && self.0.iter().all(|i| matches!(i, Item::Comments(_)))
}
}