| 197 | } |
| 198 | |
| 199 | std::vector<std::string> FileContent::collectSubTree(NodeId index) const { |
| 200 | std::vector<std::string> text; |
| 201 | |
| 202 | text.push_back(m_objects[index].print(m_symbolTable, index, |
| 203 | GetDefinitionFile(index), m_fileId)); |
| 204 | |
| 205 | if (m_objects[index].m_child) { |
| 206 | for (const auto& s : collectSubTree(m_objects[index].m_child)) { |
| 207 | text.push_back(" " + s); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | if (m_objects[index].m_sibling) { |
| 212 | for (const auto& s : collectSubTree(m_objects[index].m_sibling)) { |
| 213 | text.push_back(s); |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | return text; |
| 218 | } |
| 219 | |
| 220 | void FileContent::SetDefinitionFile(NodeId index, PathId def) { |
| 221 | m_definitionFiles.emplace(index, def); |