use super::{Comment, Identifier, Span, WithDocumentation, WithIdentifier, WithSpan};
use crate::ast::config::ConfigBlockProperty;
#[derive(Debug, Clone)]
pub struct GeneratorConfig {
pub name: Identifier,
pub properties: Vec<ConfigBlockProperty>,
pub(crate) documentation: Option<Comment>,
pub span: Span,
}
impl WithIdentifier for GeneratorConfig {
fn identifier(&self) -> &Identifier {
&self.name
}
}
impl WithSpan for GeneratorConfig {
fn span(&self) -> Span {
self.span
}
}
impl WithDocumentation for GeneratorConfig {
fn documentation(&self) -> Option<&str> {
self.documentation.as_ref().map(|doc| doc.text.as_str())
}
}