示例#1
0
文件: main.cpp 项目: Zoxc/legion
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
}
示例#2
0
std::ostream& operator<<(std::ostream& os, ValueData & valr){
  DebugPrinter d;
  d.print(os, &valr);
  return os;
}