use crate::codegen::syntax_tree_pysql::{DefaultName, Name, NodeType, ToHtml};
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct OtherwiseNode {
pub childs: Vec<NodeType>,
}
impl Name for OtherwiseNode {
fn name() -> &'static str {
"otherwise"
}
}
impl DefaultName for OtherwiseNode {
fn default_name() -> &'static str {
"_"
}
}
impl ToHtml for OtherwiseNode {
fn as_html(&self) -> String {
let mut childs = String::new();
for x in &self.childs {
childs.push_str(&x.as_html());
}
format!("<otherwise>{}</otherwise>", childs)
}
}