2023-10-29 17:29:16 -04:00
|
|
|
use super::macros::intermediate;
|
2023-10-29 22:31:29 -04:00
|
|
|
|
2023-10-27 19:53:18 -04:00
|
|
|
use super::IElement;
|
2023-10-29 17:29:16 -04:00
|
|
|
use crate::error::CustomError;
|
2023-10-27 17:08:58 -04:00
|
|
|
|
2023-10-29 15:36:15 -04:00
|
|
|
#[derive(Debug, Clone)]
|
2023-10-27 19:53:18 -04:00
|
|
|
pub(crate) struct IQuoteBlock {
|
|
|
|
pub(crate) children: Vec<IElement>,
|
|
|
|
}
|
2023-10-27 17:08:58 -04:00
|
|
|
|
2023-10-29 18:35:42 -04:00
|
|
|
intermediate!(IQuoteBlock, QuoteBlock, original, registry, {
|
2023-10-29 17:29:16 -04:00
|
|
|
let children = {
|
|
|
|
let mut ret = Vec::new();
|
|
|
|
for obj in original.children.iter() {
|
2023-10-29 21:19:30 -04:00
|
|
|
ret.push(IElement::new(registry.clone(), obj).await?);
|
2023-10-29 17:29:16 -04:00
|
|
|
}
|
|
|
|
ret
|
|
|
|
};
|
2023-10-27 19:53:18 -04:00
|
|
|
|
2023-10-29 17:29:16 -04:00
|
|
|
Ok(IQuoteBlock { children })
|
|
|
|
});
|