pub fn flatten_ast(node: &AstNode) -> Vec<AstNode>
Flatten the AST into a linear sequence of nodes (depth-first)