| 97 | } |
| 98 | |
| 99 | std::string FileContent::printObjects() const { |
| 100 | std::string text; |
| 101 | NodeId index(0); |
| 102 | |
| 103 | StrAppend(&text, "AST_DEBUG_BEGIN\n"); |
| 104 | if (m_library) StrAppend(&text, "LIB: ", m_library->getName(), "\n"); |
| 105 | StrAppend(&text, "FILE: ", FileSystem::getInstance()->toPath(m_fileId), "\n"); |
| 106 | for (const auto& object : m_objects) { |
| 107 | StrAppend( |
| 108 | &text, |
| 109 | object.print(m_symbolTable, index, GetDefinitionFile(index), m_fileId), |
| 110 | "\n"); |
| 111 | index++; |
| 112 | } |
| 113 | StrAppend(&text, "AST_DEBUG_END\n"); |
| 114 | return text; |
| 115 | } |
| 116 | |
| 117 | std::string FileContent::printObject(NodeId nodeId) const { |
| 118 | if (!nodeId || (nodeId >= m_objects.size())) return ""; |
no test coverage detected