void print_ast(std::string name) { #ifdef AST_DEBUG DebugPrinter printer; for(List<Document>::Iterator i = compiler.documents.begin(); i; i++) { std::cout << std::endl << "Printing " + name + " for " + i().filename->string() << std::endl; std::cout << printer.print(&i().tree) << std::endl; } #endif }
std::ostream& operator<<(std::ostream& os, ValueData & valr){ DebugPrinter d; d.print(os, &valr); return os; }