use crate::ast::compiler::bound_nodes::{AnalyzedNode, BoundKind}; pub fn flatten_tuple(node: AnalyzedNode, into: &mut Vec) { match node.kind { BoundKind::Tuple { elements } => { for el in elements { flatten_tuple(el, into); } } BoundKind::Record { fields } => { for (_, v) in fields { flatten_tuple(v, into); } } BoundKind::Nop => {} _ => into.push(node), } }