Create a formatter that traverses the AST to generate formatted code. The formatter should apply rules for code indentation, line breaks, space between operators, and other formatting details, including handling of comments. Key components to focus on include: