use wdl_ast::Element;
use wdl_ast::Node;
use crate::element::FormatElement;
use crate::element::collate;
pub trait AstNodeFormatExt {
fn into_format_element(self) -> FormatElement;
}
impl AstNodeFormatExt for Node {
fn into_format_element(self) -> FormatElement
where
Self: Sized,
{
let children = collate(&self);
FormatElement::new(Element::Node(self), children)
}
}