| 6075 | //--------------------------------------------------------------------------- |
| 6076 | |
| 6077 | void Tokenizer::printDebugOutput(std::ostream &out) const |
| 6078 | { |
| 6079 | if (!list.front()) |
| 6080 | return; |
| 6081 | |
| 6082 | const bool debug = mSettings.debugSimplified || mSettings.debugnormal || mSettings.debugsymdb || mSettings.debugast || mSettings.debugvalueflow; |
| 6083 | if (!debug) |
| 6084 | return; |
| 6085 | |
| 6086 | const bool xml = (mSettings.outputFormat == Settings::OutputFormat::xml); |
| 6087 | |
| 6088 | if (xml) |
| 6089 | out << "<debug>" << std::endl; |
| 6090 | |
| 6091 | if (mSettings.debugSimplified || mSettings.debugnormal) |
| 6092 | list.front()->printOut(out, xml, nullptr, list.getFiles()); |
| 6093 | |
| 6094 | if (mSymbolDatabase) { |
| 6095 | if (xml) |
| 6096 | mSymbolDatabase->printXml(out); |
| 6097 | else if (mSettings.debugsymdb) |
| 6098 | mSymbolDatabase->printOut("Symbol database"); |
| 6099 | } |
| 6100 | |
| 6101 | if (mSettings.debugast) |
| 6102 | list.front()->printAst(xml, list.getFiles(), out); |
| 6103 | |
| 6104 | if (mSettings.debugvalueflow) |
| 6105 | list.front()->printValueFlow(list.getFiles(), xml, out); |
| 6106 | |
| 6107 | if (xml) |
| 6108 | out << "</debug>" << std::endl; |
| 6109 | } |
| 6110 | |
| 6111 | void Tokenizer::dump(std::ostream &out) const |
| 6112 | { |
no test coverage detected