use serde::Serialize;
use super::{Element, Expression, Parameters, Span};
#[derive(Debug, Clone, Serialize)]
pub struct ListElement {
#[cfg_attr(not(feature = "include_locations"), serde(skip_serializing))]
pub span: Span,
#[cfg_attr(not(feature = "include_locations"), serde(skip_serializing))]
pub open_span: Span,
#[cfg_attr(not(feature = "include_locations"), serde(skip_serializing))]
pub close_span: Span,
pub kind: String,
pub parameters: Parameters,
pub children: Vec<ListContentItem>,
}
#[derive(Debug, Clone, Serialize)]
pub enum ListContentItem {
Item(ListItemElement),
Conditional(ConditionalListItems),
}
#[derive(Debug, Clone, Serialize)]
pub struct ListItemElement {
#[cfg_attr(not(feature = "include_locations"), serde(skip_serializing))]
pub span: Span,
#[cfg_attr(not(feature = "include_locations"), serde(skip_serializing))]
pub open_span: Span,
#[cfg_attr(not(feature = "include_locations"), serde(skip_serializing))]
pub close_span: Span,
pub parameters: Parameters,
pub children: Vec<Element>,
}
#[derive(Debug, Clone, Serialize)]
pub struct ConditionalListItems {
#[cfg_attr(not(feature = "include_locations"), serde(skip_serializing))]
pub span: Span,
#[cfg_attr(not(feature = "include_locations"), serde(skip_serializing))]
pub open_span: Span,
#[cfg_attr(not(feature = "include_locations"), serde(skip_serializing))]
pub close_span: Span,
pub condition: Expression,
pub items: Vec<ListItemElement>,
}